mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(keymaps): update deprecated diagnostic keymap to latest api change
This commit is contained in:
parent
7fb57a7081
commit
56191ff9b5
1 changed files with 5 additions and 3 deletions
|
|
@ -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" })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue