[idea] Quick Help working for Keywords

Creating a new thread for this, to gain more interest.

I am proposing that we extend Quick Help in Xcode to include keywords (with context). This will allow for quick access to information about the keyword. But more importantly, it allows us to teach developers about the keyword in its current context (example “in” will have different information inside for loops than when it is being used inside closures). And “return” can also have the context of what Type it should have next to it (including Void).

What would it take to implement this change to Quick Help?

Creating a new thread for this, to gain more interest.

I am proposing that we extend Quick Help in Xcode to include keywords
(with context). This will allow for quick access to information about the
keyword. But more importantly, it allows us to teach developers about the
keyword in its current context (example “in” will have different
information inside for loops than when it is being used inside closures).
And “return” can also have the context of what Type it should have next to
it (including Void).

What would it take to implement this change to Quick Help?

I'd be enthusiastic to see an overall improvement in keyword support that
extends beyond Quick Help. I'm not familiar with how much of this is
supported through SourceKit, but code completion features that are aware of
the basic grammar of the language would be, I think, helpful for a wide
array of users. For instance, wouldn't it be nice if `in` could be
suggested after typing `for i `? Or `while` after the closing brace for a
`repeat...while` loop?

And I think you've also raised a great point about operators in the other
thread. They do have some keyword-like characteristics, and it'd be great
if, say, their precedence and associativity could be visually evident while
writing. Wouldn't it be nice if the lhs and rhs for infix operators could
be highlighted when your caret is over the operator itself (almost like
parenthesis matching, but for the arguments of an infix operator)?

···

On Wed, Jun 15, 2016 at 5:15 AM, Jo Albright via swift-evolution < swift-evolution@swift.org> wrote:

_______________________________________________

swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution