From 488feb585364c2639c251e4d20e1a36283cc0bac Mon Sep 17 00:00:00 2001 From: Sangho Lee Date: Tue, 24 Jun 2025 22:26:42 +0900 Subject: [PATCH] feat: add toggle to show/hide diagnostics --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index b98ffc61..da718424 100644 --- a/init.lua +++ b/init.lua @@ -572,6 +572,11 @@ require('lazy').setup({ -- the definition of its *type*, not where it was *defined*. map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition') + -- Toggle to show/hide diagnostic messages + map('td', function() + vim.diagnostic.enable(not vim.diagnostic.is_enabled()) + end, '[T]oggle [D]iagnostics') + -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) ---@param client vim.lsp.Client ---@param method vim.lsp.protocol.Method