From b07a0eb43456aa835221821e4023e127b153e206 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sun, 22 Dec 2024 16:16:20 +0000 Subject: [PATCH] workaround neovim bug --- sets/nvim.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sets/nvim.nix b/sets/nvim.nix index 9dcd08f..e60b7a4 100644 --- a/sets/nvim.nix +++ b/sets/nvim.nix @@ -175,6 +175,16 @@ lib.setAttrByPath setPath ( { name = 'cmdline' } }) }) + + 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 end ''; }