diff --git a/src/.config/nvim/coding.vim b/src/.config/nvim/coding.vim index f8a5008..3d72f7b 100644 --- a/src/.config/nvim/coding.vim +++ b/src/.config/nvim/coding.vim @@ -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 dxx TroubleToggle +nnoremap dxw TroubleToggle workspace_diagnostics +nnoremap dxd TroubleToggle document_diagnostics +nnoremap dxq TroubleToggle quickfix +nnoremap dxl TroubleToggle loclist +nnoremap gR TroubleToggle lsp_references diff --git a/src/.config/nvim/lua/init.lua b/src/.config/nvim/lua/init.lua index c33bdb0..9c51c95 100644 --- a/src/.config/nvim/lua/init.lua +++ b/src/.config/nvim/lua/init.lua @@ -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 +})