summaryrefslogtreecommitdiff
path: root/after
diff options
context:
space:
mode:
Diffstat (limited to 'after')
-rw-r--r--after/ftplugin/rust.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/after/ftplugin/rust.lua b/after/ftplugin/rust.lua
new file mode 100644
index 0000000..390e02f
--- /dev/null
+++ b/after/ftplugin/rust.lua
@@ -0,0 +1,10 @@
+-- Fix: 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