fix: nvim rust analyzer weirdness

This commit is contained in:
Max Hohlfeld 2024-11-30 18:42:22 +01:00
parent 8e409621cc
commit 339df0770b
2 changed files with 12 additions and 0 deletions

View File

@ -229,6 +229,17 @@ lsp.lua_ls.setup {
}, },
} }
-- Workaround for rust analyzer popping cancelation up https://github.com/neovim/neovim/issues/30985
for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(err, result, context, config)
if err ~= nil and err.code == -32802 then
return
end
return default_diagnostic_handler(err, result, context, config)
end
end
-- Snippets -- Snippets
local ls = require('luasnip') local ls = require('luasnip')
local types = require('luasnip.util.types') local types = require('luasnip.util.types')

View File

@ -46,6 +46,7 @@
become: true become: true
ansible.builtin.package: ansible.builtin.package:
name: name:
- lua-jsregexp # for Lua-Snip
- lua-language-server # Lua - lua-language-server # Lua
- texlab # Tex - texlab # Tex
- pyright # Python - pyright # Python