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
LSP: support InlayHint, a new feature in LSP Spec 3.17 #18086
Comments
|
My main motivation for not wanting to do this right now is I'd rather wait for anticonceal to be merged, otherwise we're going to have to hack it with virtual text on the right (how the plugins do it), and it's not really matching the expectation of an inlay hint. |
Personally, I'd like to have a toggle option to show all of them at the end of line like the plugins do, despite they are called "inlay hints", since intrusive hints interleave the code and make it hard to read. |
|
I think it's likely we would implement that by allowing the user to override the function that places the decorations, similar to how we do with the diagnostic API (by registering a handler). I don't think we'll add a config option. |
|
LSP 3.17 also has another awesome feature, |
|
gopls already support inlay hints: https://github.com/golang/tools/blob/master/gopls/doc/settings.md#inlayhint https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md |
These aren't actually available in core neovim yet[1]. Just adding them for when the time comes. [1]: neovim/neovim#18086
|
Just a note, I found there are plugins implementing inlay hints now, like |
Also waiting for anticonceal (neovim/neovim#9496) and builtin support (neovim/neovim#18086)
Implements debounced automatic refresh of inlay hints, adds public functions in lsp.lua and docs Closes neovim#18086
Implements debounced automatic refresh of inlay hints, adds public functions in lsp.lua and docs Closes neovim#18086
Implements debounced automatic refresh of inlay hints, adds public functions in lsp.lua and docs Closes neovim#18086
Implements debounced automatic refresh of inlay hints, adds public functions in lsp.lua and docs Closes neovim#18086
Implements debounced automatic refresh of inlay hints, adds public functions in lsp.lua and docs Closes neovim#18086
This PR adds auto refresh and a public interface on top of neovim#23736 Closes neovim#18086
This PR adds automatic refresh and a public interface on top of neovim#23736 Closes neovim#18086
This PR adds automatic refresh and a public interface on top of neovim#23736 Closes neovim#18086
This PR adds automatic refresh and a public interface on top of neovim#23736 Closes neovim#18086
This PR adds automatic refresh and a public interface on top of neovim#23736 Closes neovim#18086
This PR adds automatic refresh and a public interface on top of neovim#23736 Closes neovim#18086
Add automatic refresh and a public interface on top of #23736 * add on_reload, on_detach handlers in `enable()` buf_attach, and LspDetach autocommand in case of manual detach * unify `__buffers` and `hint_cache_by_buf` * use callback bufnr in `on_lines` callback, bufstate: remove __index override * move user-facing functions into vim.lsp.buf, unify enable/disable/toggle Closes #18086
Feature description
The inlay hint feature is stabilized in latest LSP Spec 3.17, and implemented in VSCode.
The latest stable version of rust-analyzer 2022-04-11 already changed the inlay hint interface from the experimental one to the finalized one. Thus it no longer work with nvim's builtin LSP and lsp_extensions.nvim. Since it's not an experimental feature anymore, I think it's better to be implemented inside nvim rather than plugins.
The text was updated successfully, but these errors were encountered: