-
Notifications
You must be signed in to change notification settings - Fork 314
Add client-side support for inlay hints in VSCode #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve got two minor inline hints inline.
Implement the `sourcekit-lsp/inlayHints` request on the client side for VSCode. - Add scaffolding for inlay hints in the VSCode extension - Add InlayHintsStyle - Add some notes on the inlay hints client - Implement generation of inlay hint decorations for VSCode - Implement syncCacheAndRenderHints on the VSCode side - Consistently use 4-space-indent in TypeScript sources - Remove unused (and unneeded) hints check - Address suggestions regarding inlay hints in VSCode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just managed to try this out and it feels good, especially if I imagine the type hints on the variable and not expression side.
Disabling the Render inlay type annotations in the editor
doesn’t seem to do anything for me though and type hints are still being displayed if the setting is disabled.
Also, after trying it out, I think we should default Render inlay type annotations in the editor
to false
while the feature is under development and maybe also mark it as (experimental)
or something like that.
While the feature is under development and experimental.
Thanks for the feedback, both of these issues should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looking good now!
@swift-ci Please test |
For easier reviewability, the client-side implementation of inlay hints for VSCode (originally part of #406) is now in this PR. It implements the new (non-standard)
sourcekit-lsp/inlayHints
request and generates corresponding text decorations for inlay hints:Inlay hints as text decorations on the client side are also a proposed part of the VSCode API, although this implementation does not use it yet, as it is only available in VSCode Insiders builds. More details can be found here:
Once inlay hints become part of LSP, this client-side implementation can be removed completely as VSCode's internal language client will then send inlay hint requests as appropriate.