neovim: update deprecated use of vim.diagnostics.goto_prev/next with jump

This commit is contained in:
Mark Riedesel 2025-04-06 09:06:37 -05:00
parent f5262257d5
commit a441122b9a

View file

@ -56,10 +56,10 @@ return {
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
opts.desc = "Go to previous diagnostic"
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
keymap.set("n", "[d", function () vim.diagnostic.jump({count=-1}) end, opts) -- jump to previous diagnostic in buffer
opts.desc = "Go to next diagnostic"
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
keymap.set("n", "]d", function () vim.diagnostic.jump({count=1}) end, opts) -- jump to next diagnostic in buffer
opts.desc = "Show documentation for what is under cursor"
keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor