Skip to content

Commit 488feb5

Browse files
committed
feat: add toggle to show/hide diagnostics
1 parent 3338d39 commit 488feb5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

init.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,11 @@ require('lazy').setup({
572572
-- the definition of its *type*, not where it was *defined*.
573573
map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
574574

575+
-- Toggle to show/hide diagnostic messages
576+
map('<leader>td', function()
577+
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
578+
end, '[T]oggle [D]iagnostics')
579+
575580
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
576581
---@param client vim.lsp.Client
577582
---@param method vim.lsp.protocol.Method

0 commit comments

Comments
 (0)