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

## Description

refectors deprecated `diagnostic_goto` calls to newer
`vim.diagnostic.jump` API.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
Md. Iftakhar Awal Chowdhury 2025-10-03 00:52:41 +06:00 committed by GitHub
parent dc1ffa5bcb
commit b9d38f6920
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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