Skip to content

Commit

Permalink
Sync vim diagnostic local list with LSP.
Browse files Browse the repository at this point in the history
  • Loading branch information
mazdabat committed Dec 24, 2024
1 parent de44f49 commit 7808a96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7808a96

Please sign in to comment.