neovim configuration using rocks.nvim plugin manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: stable compatible diagnostic keymaps

+17
+17
lua/core/keymaps.lua
··· 45 45 46 46 -- diagnostics 47 47 vim.keymap.set("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" }) 48 + if vim.fn.has("nvim-0.11") == 0 then 49 + vim.diagnostic.jump = function (opts) 50 + local count = opts.count 51 + opts.count = nil 52 + if count > 0 then 53 + opts.count = nil 54 + for _ = 1, count do 55 + vim.diagnostic.goto_next(opts) 56 + end 57 + else 58 + opts.count = nil 59 + for _ = 1, -count do 60 + vim.diagnostic.goto_prev(opts) 61 + end 62 + end 63 + end 64 + end 48 65 -- stylua: ignore start 49 66 vim.keymap.set({ "n", "x" }, "]d", function() vim.diagnostic.jump({ count = 1, float = true }) end, { desc = "Next Diagnostic" }) 50 67 vim.keymap.set({ "n", "x" }, "[d", function() vim.diagnostic.jump({ count = -1, float = true }) end, { desc = "Prev Diagnostic" })