workaround neovim bug

This commit is contained in:
Artemis Tosini 2024-12-22 16:16:20 +00:00
parent af679e1772
commit b07a0eb434
Signed by: artemist
GPG key ID: ADFFE553DCBB831E

View file

@ -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
'';
}