From cdc02fc3e4549d7bafb3df29843fe14228b2aad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Mon, 13 Oct 2025 23:49:21 +0200 Subject: [PATCH] feat: add keymap to swap virtual_text and virtual_lines for diagnostic --- plugin/diagswap.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 plugin/diagswap.lua diff --git a/plugin/diagswap.lua b/plugin/diagswap.lua new file mode 100644 index 0000000..023bbf6 --- /dev/null +++ b/plugin/diagswap.lua @@ -0,0 +1,8 @@ +local state = true + +local function swap() + vim.diagnostic.config({ virtual_text = not state, virtual_lines = state }) + state = not state +end + +vim.keymap.set("n", "dt", swap)