nvim: add trouble plugin

This commit is contained in:
dogeystamp 2023-06-10 13:46:16 -04:00
parent ed92d2b650
commit 2e2d8ab300
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 25 additions and 0 deletions

View File

@ -23,3 +23,12 @@ source $XDG_CONFIG_HOME/nvim/vimspector.vim
" bracket closing
Plug 'jiangmiao/auto-pairs'
let g:AutoPairsShortcutToggle = "@@"
" improved error list
Plug 'folke/trouble.nvim'
nnoremap <leader>dxx <cmd>TroubleToggle<cr>
nnoremap <leader>dxw <cmd>TroubleToggle workspace_diagnostics<cr>
nnoremap <leader>dxd <cmd>TroubleToggle document_diagnostics<cr>
nnoremap <leader>dxq <cmd>TroubleToggle quickfix<cr>
nnoremap <leader>dxl <cmd>TroubleToggle loclist<cr>
nnoremap gR <cmd>TroubleToggle lsp_references<cr>

View File

@ -126,3 +126,19 @@ cmp.setup({
{ name = 'buffer' },
})
})
-- improved error list
require('trouble').setup({
icons = false,
fold_open = "v", -- icon used for open folds
fold_closed = ">", -- icon used for closed folds
indent_lines = false, -- add an indent guide below the fold icons
signs = {
-- icons / text used for a diagnostic
error = "error",
warning = "warn",
hint = "hint",
information = "info"
},
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
})