From a26cd9b2f8eaa22218fb873fdf33bb1236ce9b91 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 8 Sep 2024 21:28:33 -0400 Subject: [PATCH] add keymap for toggling inline diagnostic messages & display on/off --- lua/keymaps.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index fe104a6..721fd43 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -35,4 +35,10 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- Toggling word wrap on/off vim.keymap.set('n', 'tw', 'set wrap!', { desc = 'Toggle: [W]ord wrapping' }) +-- Inline Diagnostic display toggling on/off +vim.keymap.set('n', 'tn', function() + -- vim.diagnostic.config { virtual_text = not vim.diagnostic.config().virtual_text } + vim.diagnostic.enable(not vim.diagnostic.is_enabled()) +end, { desc = 'Toggle: I[n]line Diagnostics' }) + -- vim: ts=2 sts=2 sw=2 et