Skip to content

Commit 7808a96

Browse files
author
Mazdabat
committed
Sync vim diagnostic local list with LSP.
1 parent de44f49 commit 7808a96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ vim.opt.scrolloff = 10
165165
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
166166

167167
-- Diagnostic keymaps
168-
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
168+
vim.keymap.set('n', '<leader>q', function()
169+
vim.diagnostic.setloclist { open = true }
170+
end, { desc = 'Open and sync diagnostic [Q]uickfix list' })
169171

170172
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
171173
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which

0 commit comments

Comments
 (0)