add remaps for local quickfix list
This commit is contained in:
@@ -176,6 +176,16 @@ lsp_installer.on_server_ready(function(server)
|
|||||||
server:setup(opts)
|
server:setup(opts)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- Populate local quickfix list with diagnostics from lsp
|
||||||
|
-- Thanks to ThePrimeagen
|
||||||
|
-- https://www.youtube.com/watch?v=IoyW8XYGqjM
|
||||||
|
vim.cmd([[
|
||||||
|
augroup PopulateLocalListWithLsp
|
||||||
|
autocmd!
|
||||||
|
autocmd! BufWritePre,BufEnter,InsertLeave * :lua vim.diagnostic.setloclist({ open = false })
|
||||||
|
augroup END
|
||||||
|
]])
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
signs = false,
|
signs = false,
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ vmap("J", ":m '>+1<CR>gv=gv") -- Shift+j - same as above mapping but the other w
|
|||||||
vmap("<", "<gv")
|
vmap("<", "<gv")
|
||||||
vmap(">", ">gv")
|
vmap(">", ">gv")
|
||||||
|
|
||||||
|
-- Quickfix and local lists
|
||||||
|
nmap("lo", ":lopen<CR>") -- lo - open local quickfix list
|
||||||
|
nmap("ln", ":lnext<CR>") -- ln - go to next local quickfix entry
|
||||||
|
nmap("lp", ":lprev<CR>") -- lp - go to previous local quickfix entry
|
||||||
|
|
||||||
-- Terminal
|
-- Terminal
|
||||||
tmap("<ESC>", "<C-\\><C-n>") -- Escape - in terminal mode, quit to normal mode
|
tmap("<ESC>", "<C-\\><C-n>") -- Escape - in terminal mode, quit to normal mode
|
||||||
nmap("Th", ":lua require('user.utils').open_terminal()<CR>") -- Shift+t - open terminal in horizontal split
|
nmap("Th", ":lua require('user.utils').open_terminal()<CR>") -- Shift+t - open terminal in horizontal split
|
||||||
|
|||||||
Reference in New Issue
Block a user