-
Notifications
You must be signed in to change notification settings - Fork 4
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
Not working with rust-analyzer #2
Comments
This plugin works with any LSP server that supports Please check the documentation of |
@henriquehbr @sbaildon @beauwilliams have you guys got this plugin working with rust-analyzer? If yes, care to share the code for it? I expected types to show up in virtual text, but I only can see run commands at the top of the file. |
Type hints in rust_analyzer is supported by LSP espeficifcation for 3.17: microsoft/language-server-protocol#956
NoteNeovim has built-in support for codelens. local on_attach = function(client, bufnr)
--- Only Neovim 0.7
if client.resolved_capabilities.code_lens then
local codelens = vim.api.nvim_create_augroup(
'LSPCodeLens',
{ clear = true }
)
vim.api.nvim_create_autocmd({ 'BufEnter' }, {
group = codelens,
callback = function()
vim.lsp.codelens.refresh()
end,
buffer = bufnr,
once = true,
})
vim.api.nvim_create_autocmd({ 'BufWritePost', 'CursorHold' }, {
group = codelens,
callback = function()
vim.lsp.codelens.refresh()
end,
buffer = bufnr,
})
end
end |
I've followed readme instructions step by step, installed
virtual-types.nvim
, included theon_attach
snippet, but it simply doesn't works, no error or warning output is displayed, but the virtual texts aren't showing up when i open a.rs
fileNot sure if this is relevant, but I'm using
nvim-lspinstall
for easing the process of setting up language serversHere's my system details:
The text was updated successfully, but these errors were encountered: