Sync vim diagnostic local list with LSP.

This commit is contained in:
Mazdabat 2024-12-24 13:38:13 -04:00
parent de44f49101
commit 7808a96a0c
1 changed files with 3 additions and 1 deletions

View File

@ -165,7 +165,9 @@ vim.opt.scrolloff = 10
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
vim.keymap.set('n', '<leader>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 <C-\><C-n>, which