Add Trouble for LSP diagnostics display

This commit is contained in:
Thomas Gideon 2022-06-01 07:46:39 -04:00
parent 1441dd27a2
commit 671dbd3bf9
3 changed files with 17 additions and 0 deletions

View file

@ -122,3 +122,11 @@ noremap <C-Up> :call AdjustFontSize(1)<CR>
noremap <C-Down> :call AdjustFontSize(-1)<CR> noremap <C-Down> :call AdjustFontSize(-1)<CR>
inoremap <C-Up> <Esc>:call AdjustFontSize(1)<CR>a inoremap <C-Up> <Esc>:call AdjustFontSize(1)<CR>a
inoremap <C-Down> <Esc>:call AdjustFontSize(-1)<CR>a inoremap <C-Down> <Esc>:call AdjustFontSize(-1)<CR>a
lua << EOF
require("trouble").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
EOF

View file

@ -30,3 +30,10 @@ nnoremap <silent> <Leader>rn <cmd>lua vim.lsp.buf.rename()<CR>
nnoremap <silent> g[ <cmd>lua vim.diagnostic.goto_prev()<CR> nnoremap <silent> g[ <cmd>lua vim.diagnostic.goto_prev()<CR>
nnoremap <silent> g] <cmd>lua vim.diagnostic.goto_next()<CR> nnoremap <silent> g] <cmd>lua vim.diagnostic.goto_next()<CR>
nnoremap <silent> gE <cmd>lua vim.diagnostic.setloclist()<CR> nnoremap <silent> gE <cmd>lua vim.diagnostic.setloclist()<CR>
" work with Trouble to view lists of diagnostic warnings/ennoremap <leader>xx <cmd>TroubleToggle<cr>
nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
nnoremap gR <cmd>TroubleToggle lsp_references<cr>rrors

View file

@ -13,6 +13,8 @@ Plug 'vim-airline/vim-airline-themes'
Plug 'mbbill/undotree' Plug 'mbbill/undotree'
" Preferred color scheme " Preferred color scheme
Plug 'fneu/breezy' Plug 'fneu/breezy'
" diagnostics display
Plug 'folke/trouble.nvim'
" files, folders, projects, etc. " files, folders, projects, etc.