From 7808a96a0ca4ef463804b532bed90b667d78c189 Mon Sep 17 00:00:00 2001 From: Mazdabat Date: Tue, 24 Dec 2024 13:38:13 -0400 Subject: [PATCH] Sync vim diagnostic local list with LSP. --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ee8fbc99..03d95dc8 100644 --- a/init.lua +++ b/init.lua @@ -165,7 +165,9 @@ vim.opt.scrolloff = 10 vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +vim.keymap.set('n', 'q', function() + vim.diagnostic.setloclist { open = true } +end, { desc = 'Open and sync diagnostic [Q]uickfix list' }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which