nvim: add trouble plugin
This commit is contained in:
parent
ed92d2b650
commit
2e2d8ab300
@ -23,3 +23,12 @@ source $XDG_CONFIG_HOME/nvim/vimspector.vim
|
|||||||
" bracket closing
|
" bracket closing
|
||||||
Plug 'jiangmiao/auto-pairs'
|
Plug 'jiangmiao/auto-pairs'
|
||||||
let g:AutoPairsShortcutToggle = "@@"
|
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>
|
||||||
|
@ -126,3 +126,19 @@ cmp.setup({
|
|||||||
{ name = 'buffer' },
|
{ 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
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user