Skip to content

Commit c24af5f

Browse files
guru245oriori1703
authored andcommitted
feat: add toggle to show/hide diagnostics
1 parent 4b6dfab commit c24af5f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lua/keymaps.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ vim.diagnostic.config {
2121
jump = { float = true },
2222
}
2323

24+
vim.keymap.set('n', '<leader>td', function() vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end, { desc = '[T]oggle [D]iagnostics' })
25+
2426
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
2527

2628
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier

0 commit comments

Comments
 (0)