add keymap for toggling inline diagnostic messages & display on/off

This commit is contained in:
Gered 2024-09-08 21:28:33 -04:00
parent 42da8e2330
commit a26cd9b2f8

View file

@ -35,4 +35,10 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- Toggling word wrap on/off
vim.keymap.set('n', '<leader>tw', '<Cmd>set wrap!<CR>', { desc = 'Toggle: [W]ord wrapping' })
-- Inline Diagnostic display toggling on/off
vim.keymap.set('n', '<leader>tn', function()
-- vim.diagnostic.config { virtual_text = not vim.diagnostic.config().virtual_text }
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
end, { desc = 'Toggle: I[n]line Diagnostics' })
-- vim: ts=2 sts=2 sw=2 et