fix(lsp.keymap): only toggle diagnostics for current buffer

This commit is contained in:
2025-10-05 00:00:53 +02:00
parent 8bb81b27d3
commit b7bc837d3d
+4 -1
View File
@@ -68,7 +68,10 @@ function M.set_defaults(bufnr)
mode = { "n" }, mode = { "n" },
lhs = "<leader>ld", lhs = "<leader>ld",
rhs = function() rhs = function()
vim.diagnostic.enable(not vim.diagnostic.is_enabled()) vim.diagnostic.enable(
not vim.diagnostic.is_enabled({ bufnr = bufnr }),
{ bufnr = bufnr }
)
end, end,
}, },
{ {