fix(keymaps): update deprecated diagnostic keymap to latest api change

This commit is contained in:
Atif 2025-10-02 21:14:40 +06:00
parent 7fb57a7081
commit 56191ff9b5
No known key found for this signature in database
GPG key ID: 8C0681C49694B44A

View file

@ -120,10 +120,12 @@ end, { desc = "Format" })
-- diagnostic
local diagnostic_goto = function(next, severity)
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
severity = severity and vim.diagnostic.severity[severity] or nil
return function()
go({ severity = severity })
vim.diagnostic.jump({
count = next and 1 or -1,
severity = severity and vim.diagnostic.severity[severity] or nil,
float = true,
})
end
end
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })