nvim-snappy/lua/keymaps/float_diag.lua

36 lines
996 B
Lua
Raw Normal View History

vim.keymap.set('n', '<leader>ds', function()
vim.diagnostic.open_float()
end, { desc = '[D]ebug Float', silent = true })
2025-02-12 11:49:02 +01:00
vim.keymap.set('n', '[d', function()
vim.diagnostic.jump({
count = -1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
})
end, { desc = 'Prev [D]iagnoatic', silent = true })
vim.keymap.set('n', ']d', function()
vim.diagnostic.jump({
count = 1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
})
end, { desc = 'Next [D]iagnostic', silent = true })
2025-02-12 11:49:02 +01:00
vim.keymap.set('n', '[e', function()
vim.diagnostic.jump({
count = -1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
severity = vim.diagnostic.severity.ERROR,
})
end, { desc = 'Prev [E]rror', silent = true })
vim.keymap.set('n', ']e', function()
vim.diagnostic.jump({
count = 1,
float = not vim.diagnostic.config().virtual_lines,
wrap = false,
severity = vim.diagnostic.severity.ERROR,
})
end, { desc = 'Next [E]rror', silent = true })