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:
Ray Elliott 2025-12-12 01:17:07 +00:00
parent 670450dccb
commit b473cc6d15
1 changed files with 3 additions and 0 deletions

View File

@ -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()