feat(keymaps): diagnostic navigation respect count

- Multiply diagnostic jump count by vim.v.count1 so numeric prefixes are honored
- Preserve next/previous logic by keeping sign based on the `next` argument
- Leave severity and floating window behavior unchanged while fixing count handling
This commit is contained in:
Atif 2025-10-03 00:42:21 +06:00
parent 56191ff9b5
commit fee7b82c0c
No known key found for this signature in database
GPG key ID: 8C0681C49694B44A

View file

@ -122,7 +122,7 @@ end, { desc = "Format" })
local diagnostic_goto = function(next, severity)
return function()
vim.diagnostic.jump({
count = next and 1 or -1,
count = (next and 1 or -1) * vim.v.count1,
severity = severity and vim.diagnostic.severity[severity] or nil,
float = true,
})