From fa057cb4889877e22e71377c0d2f72cf138eef1b Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Tue, 7 Feb 2023 22:31:05 -0800 Subject: [PATCH] Added trouble --- fnl/plugin.fnl | 32 +++++++++++++++++++++----------- fnl/plugin/lsp.fnl | 6 +++++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/fnl/plugin.fnl b/fnl/plugin.fnl index d9dcbde..3d95895 100644 --- a/fnl/plugin.fnl +++ b/fnl/plugin.fnl @@ -139,6 +139,15 @@ (module-call! :telescope :load_extension :ui-select) (module-call! :telescope :load_extension :fzf))) + ;; Trouble + (use! :folke/trouble.nvim + :cmd [ :Trouble + :TroubleToggle + :TroubleClose + :TroubleRefresh ] + :config + (setup! :trouble)) + ;; Nvim surround (use! :kylechui/nvim-surround :config @@ -189,17 +198,18 @@ ;; illuminate (same symbol highlight) (use! :RRethy/vim-illuminate :config - (module-call! :illuminate :configure) - { :providers [ - "lsp" - "treesitter" - "ragex" ] - :modes_denylist [ - :markdown - :text - :gitconfig - :gitignore ] - :delay 0 } + (module-call! :illuminate + :configure { :providers [ + "lsp" + "treesitter" + "ragex" ] + :filetypes_denylist [ + :Trouble + :markdown + :text + :gitconfig + :gitignore ] + :delay 0 }) (hook! :FileType :lua #(vim.api.nvim_set_hl 0 :IlluminatedWordText {}))) diff --git a/fnl/plugin/lsp.fnl b/fnl/plugin/lsp.fnl index 3addbee..049fe67 100644 --- a/fnl/plugin/lsp.fnl +++ b/fnl/plugin/lsp.fnl @@ -35,7 +35,11 @@ (bind! :n :gr "Telescope lsp_references" buf) (bind! :n :gd "Telescope lsp_definitions" buf) (bind! :n :gI "Telescope lsp_implementations" buf) - (bind! :n :D "Telescope lsp_type_definitions" buf)) + (bind! :n :D "Telescope lsp_type_definitions" buf) + + ;; Some trouble commands + (bind! :n :e "TroubleToggle document_diagnostics") + (bind! :n :E "TroubleToggle workspace_diagnostics")) (fn get-data-dir [server root]