Skip to content

Commit 7c090c0

Browse files
guru245bfabio
authored andcommitted
feat: add toggle to show/hide diagnostics
1 parent 11e63a5 commit 7c090c0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

init.lua

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

579+
-- Toggle to show/hide diagnostic messages
580+
map('<leader>td', function()
581+
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
582+
end, '[T]oggle [D]iagnostics')
583+
579584
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
580585
---@param client vim.lsp.Client
581586
---@param method vim.lsp.protocol.Method

0 commit comments

Comments
 (0)