From 671dbd3bf9f4dcdcb8f518470b081912fae1da21 Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Wed, 1 Jun 2022 07:46:39 -0400 Subject: [PATCH] Add Trouble for LSP diagnostics display --- init.vim | 8 ++++++++ mapping.vim | 7 +++++++ plug.vim | 2 ++ 3 files changed, 17 insertions(+) diff --git a/init.vim b/init.vim index e09a1c2..72676e0 100644 --- a/init.vim +++ b/init.vim @@ -122,3 +122,11 @@ noremap :call AdjustFontSize(1) noremap :call AdjustFontSize(-1) inoremap :call AdjustFontSize(1)a inoremap :call AdjustFontSize(-1)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 diff --git a/mapping.vim b/mapping.vim index 593ee78..fabc268 100644 --- a/mapping.vim +++ b/mapping.vim @@ -30,3 +30,10 @@ nnoremap rn lua vim.lsp.buf.rename() nnoremap g[ lua vim.diagnostic.goto_prev() nnoremap g] lua vim.diagnostic.goto_next() nnoremap gE lua vim.diagnostic.setloclist() + +" work with Trouble to view lists of diagnostic warnings/ennoremap xx TroubleToggle +nnoremap xw TroubleToggle workspace_diagnostics +nnoremap xd TroubleToggle document_diagnostics +nnoremap xq TroubleToggle quickfix +nnoremap xl TroubleToggle loclist +nnoremap gR TroubleToggle lsp_referencesrrors diff --git a/plug.vim b/plug.vim index 764065c..da319cf 100644 --- a/plug.vim +++ b/plug.vim @@ -13,6 +13,8 @@ Plug 'vim-airline/vim-airline-themes' Plug 'mbbill/undotree' " Preferred color scheme Plug 'fneu/breezy' +" diagnostics display +Plug 'folke/trouble.nvim' " files, folders, projects, etc.