mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-12-25 12:14:19 +01:00
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:
committed by
GitHub
parent
dc1ffa5bcb
commit
b9d38f6920
@@ -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) * vim.v.count1,
|
||||
severity = severity and vim.diagnostic.severity[severity] or nil,
|
||||
float = true,
|
||||
})
|
||||
end
|
||||
end
|
||||
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
||||
|
||||
Reference in New Issue
Block a user