From 814429d3ca69e3cc0e44daf716d52c7c78833350 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:31:06 +0100 Subject: [PATCH] lsp(rust): remove cmp-nvim-lsp workaround that became obsolete issue was fixed with latest cmp-nvim-lsp --- lua/nxvim/lsp/plugins/mason/lspconfig.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lua/nxvim/lsp/plugins/mason/lspconfig.lua b/lua/nxvim/lsp/plugins/mason/lspconfig.lua index 793ef56..4b70ffa 100644 --- a/lua/nxvim/lsp/plugins/mason/lspconfig.lua +++ b/lua/nxvim/lsp/plugins/mason/lspconfig.lua @@ -42,14 +42,6 @@ mason_lspconfig.setup_handlers({ server_opts.root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc") elseif server == "jsonls" then server_opts.init_options = { provideFormatter = false } -- Use prettierd as formatter. - elseif server == "rust_analyzer" then - 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 elseif server == "zls" then vim.g.zig_fmt_autosave = 0 end