Closed barrett-ruth closed 1 year ago
Also, as expected, changing the "textDocument/inlayHint"
back to "clangd/inlayHints"
works like a charm in the vim.lsp.buf_request, so the inlay hints you/the rust-tools.nvim author wrote work correctly:
You need to update clangd. Before it was in the protocol, clangd used to have its own request (clangd/inlayHints). Or just use this plugin, which uses clangd's off spec inlay hints.
In any case this is the wrong place if you're using LSP inlay hints - this plugin is only for off-spec features
To reiterate, either - 1) Update clangd, use 0.10's LSP inlay hints and disable inlay hints in clangd_extensions.nvim 2) Use clangd_extensions.nvim and don't enable 0.10's LSP inlay hints
Thank you for explaining the issue clearly. Apologies for my misconceptions.
I see in a recent commit you added support for nvim 0.10 inlay hints.
On the event
LspAttach
with clangd, the fieldclient.server_capabilities.inlayHintProvider
is not set to true. However,clangdInlayHintsProvider
is - I think clangd may be calling the inlay hint field something other than what the standard expects? Either way, the error stems from when a lsp request is sent in this line and the provider is not found in the LSP config.I get the following error when opening up an empty c++ file in nvim 0.10:
Let me know if I can provide more info or if you think my environment is set up incorrectly.