Skip to content

Commit

Permalink
lsp(rust): remove cmp-nvim-lsp workaround that became obsolete
Browse files Browse the repository at this point in the history
issue was fixed with latest cmp-nvim-lsp
  • Loading branch information
ttytm committed Dec 10, 2024
1 parent 6e5cc0e commit 814429d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lua/nxvim/lsp/plugins/mason/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 814429d

Please sign in to comment.