fix(rust_analyzer): remove special filtering of diagnostics

This commit is contained in:
2026-01-05 19:22:32 +01:00
parent b1b2453945
commit bce3524b54
+1 -16
View File
@@ -2,22 +2,7 @@ local lsp = require("lsp")
---@type vim.lsp.Config
return {
on_attach = function(client, bufnr)
lsp.on_attach(client, bufnr)
local handler_name = "textDocument/publishDiagnostics"
local default_handler = client.handlers[handler_name]
or vim.lsp.handlers[handler_name]
client.handlers[handler_name] = function(err, result, context, config)
if result and result.diagnostics then
result.diagnostics = vim.tbl_filter(function(diagnostic)
return diagnostic.severity < vim.diagnostic.severity.HINT
end, result.diagnostics)
end
default_handler(err, result, context, config)
end
end,
on_attach = lsp.on_attach,
settings = {
["rust-analyzer"] = {
check = {