mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
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:
parent
56191ff9b5
commit
fee7b82c0c
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ end, { desc = "Format" })
|
||||||
local diagnostic_goto = function(next, severity)
|
local diagnostic_goto = function(next, severity)
|
||||||
return function()
|
return function()
|
||||||
vim.diagnostic.jump({
|
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,
|
severity = severity and vim.diagnostic.severity[severity] or nil,
|
||||||
float = true,
|
float = true,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue