Add toggle for diagnostic display in keymaps
This change introduces a new keymap to toggle the display of diagnostics, enhancing user control over diagnostic visibility.
This commit is contained in:
parent
670450dccb
commit
b473cc6d15
|
|
@ -46,6 +46,9 @@ end, { desc = 'Diagnostics: All errors (quickfix)', silent = true })
|
||||||
map('n', '[d', vim.diagnostic.goto_prev, { desc = 'Diagnostics: Previous diagnostic', silent = true })
|
map('n', '[d', vim.diagnostic.goto_prev, { desc = 'Diagnostics: Previous diagnostic', silent = true })
|
||||||
map('n', ']d', vim.diagnostic.goto_next, { desc = 'Diagnostics: Next diagnostic', silent = true })
|
map('n', ']d', vim.diagnostic.goto_next, { desc = 'Diagnostics: Next diagnostic', silent = true })
|
||||||
map('n', '<leader>xd', vim.diagnostic.open_float, { desc = 'Diagnostics: Show diagnostic under cursor', silent = true })
|
map('n', '<leader>xd', vim.diagnostic.open_float, { desc = 'Diagnostics: Show diagnostic under cursor', silent = true })
|
||||||
|
map('n', '<leader>xt', function()
|
||||||
|
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
|
||||||
|
end, { desc = 'Diagnostics: Toggle display', silent = true })
|
||||||
|
|
||||||
-- Debug: Show highlight group and color under cursor
|
-- Debug: Show highlight group and color under cursor
|
||||||
map('n', '<leader>hi', function()
|
map('n', '<leader>hi', function()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue