Skip to content

Commit e244058

Browse files
guru245oriori1703
authored andcommitted
feat: add toggle to show/hide diagnostics
1 parent 7cc245e commit e244058

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@ require('lazy').setup({
559559
-- For example, in C this would take you to the header.
560560
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
561561

562+
-- Toggle to show/hide diagnostic messages
563+
map('<leader>td', function() vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end, '[T]oggle [D]iagnostics')
564+
562565
-- The following two autocommands are used to highlight references of the
563566
-- word under your cursor when your cursor rests there for a little while.
564567
-- See `:help CursorHold` for information about when this is executed

0 commit comments

Comments
 (0)