summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-05-30 23:12:02 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-05-30 23:12:02 +0200
commitb791cafc0881e9522d0e6b04e1d2307b2114efb0 (patch)
tree62e430fac0703cf089a60d4202024148208a21a0
parent4607aadb5feec8f86a0d1b43b2a55bfbfdced76a (diff)
Fix trouble with new api
-rw-r--r--fnl/plugins/trouble.fnl91
-rw-r--r--lazy-lock.json18
2 files changed, 22 insertions, 87 deletions
diff --git a/fnl/plugins/trouble.fnl b/fnl/plugins/trouble.fnl
index 35e67a9..6b56fa2 100644
--- a/fnl/plugins/trouble.fnl
+++ b/fnl/plugins/trouble.fnl
@@ -1,83 +1,18 @@
;; Pretty diagnostics.
-(local keys [{1 :<leader>jt
- 2 "<cmd>TroubleToggle workspace_diagnostics<cr>"
- :desc :Trouble}
- {1 "[e"
- 2 "<cmd>lua require(\"trouble\").previous({skip_groups = true, jump = true});<cr>"
- :desc :Trouble}
- {1 "[n"
- 2 "<cmd>lua require(\"trouble\").next({skip_groups = true, jump = true});<cr>"
- :desc :Trouble}])
+(local keys [{1 :<leader>tt
+ 2 "<cmd>Trouble diagnostics toggle<cr>"
+ :desc "Diagnostics (Trouble)"}
+ {1 :<leader>tn
+ 2 "<cmd>Trouble diagnostics toggle filter.buf=0<cr>"
+ :desc "Buffer Diagnostics (Trouble)"}
+ {1 :<leader>te
+ 2 "<cmd>Trouble lsp toggle focus=false win.position=bottom<cr>"
+ :desc "LSP Definitions / references / ... (Trouble)"}
+ {1 :<leader>ts
+ 2 "<cmd>Trouble symbols toggle focus=false win.position=bottom<cr>"
+ :desc "Symbols (Trouble)"}])
-(local opts {:position :bottom
- ; position of the list can be: bottom, top, left, right
- :height 10
- ;; height of the trouble list when position is top or bottom
- :width 50
- ;; width of the list when position is left or right
- :icons true
- ;; use devicons for filenames
- :mode :workspace_diagnostics
- ;; "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
- :fold_open ""
- ;; icon used for open folds
- :fold_closed ""
- ;; icon used for closed folds
- :group true
- ;; group results by file
- :padding true
- ;; add an extra new line on top of the list
- :action_keys {;; key mappings for actions in the trouble list
- ;; map to {} to remove a mapping for example:
- ;; close {}
- :close :q
- ;; close the list
- :cancel :<esc>
- ;; cancel the preview and get back to your last window / buffer / cursor
- :refresh :r
- ;; manually refresh
- :jump [:<cr> :<tab>]
- ;; jump to the diagnostic or open / close folds
- :open_split [:<c-x>]
- ;; open buffer in new split
- :open_vsplit [:<c-v>]
- ;; open buffer in new vsplit
- :open_tab [:<c-t>]
- ;; open buffer in new tab
- :jump_close [:o]
- ;; jump to the diagnostic and close the list
- :toggle_mode :m
- ;; toggle between "workspace" and "document" diagnostics mode
- :toggle_preview :P
- ;; toggle auto_preview
- :hover :K
- ;; opens a small popup with the full multiline message
- :preview :p
- ;; preview the diagnostic location
- :close_folds [:zM :zm]
- ;; close all folds
- :open_folds [:zR :zr]
- ;; open all folds
- :toggle_fold [:zA :za]
- ;; toggle fold of current file
- :previous :k
- ;; previous item
- :next :j
- ;; next item
- }
- :indent_lines true
- ;; add an indent guide below the fold icons
- :auto_open false
- ;; automatically open the list when you have diagnostics
- :auto_close false
- ;; automatically close the list when you have no diagnostics
- :auto_preview true
- ;; automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
- :auto_fold false
- ;; automatically fold a file trouble list at creation
- :auto_jump [:lsp_definitions]
- ;; for the given modes, automatically jump if there is only a single result
- :use_diagnostic_signs true})
+(local opts {})
{1 :folke/trouble.nvim :cmd [:TroubleToggle :Trouble] : opts : keys}
diff --git a/lazy-lock.json b/lazy-lock.json
index 3e72d75..fa50397 100644
--- a/lazy-lock.json
+++ b/lazy-lock.json
@@ -21,24 +21,24 @@
"inc-rename.nvim": { "branch": "main", "commit": "7c6125b1ee476b56708a6518a37b2a3357f57bfc" },
"lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" },
"leap-spooky.nvim": { "branch": "main", "commit": "5f44a1f63dc1c4ce50244e92da5bc0d8d1f6eb47" },
- "leap.nvim": { "branch": "main", "commit": "0a034970fb430e6027f2df556af04e19e4d9ccc5" },
+ "leap.nvim": { "branch": "main", "commit": "f6cfd526ebaf56f005cca6a4a4735a854172982e" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
- "neogit": { "branch": "master", "commit": "9da48298a1c1e1ea52b4b9b9a4c2c4ded6ac422a" },
- "no-clown-fiesta.nvim": { "branch": "master", "commit": "0cf858e14aa98218c4aec92011bded80e935549b" },
+ "neogit": { "branch": "master", "commit": "11c3d3482a38bf832103a7aac1dcd00e980ed612" },
+ "no-clown-fiesta.nvim": { "branch": "master", "commit": "caf86fbc3cf390cac8c5fba599f1500f49f622d7" },
"nvim-bqf": { "branch": "main", "commit": "7751b6ef9fbc3907478eaf23e866c4316a2ed1b4" },
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lint": { "branch": "master", "commit": "e19842a05aae484957ad20710444757bc0a61d63" },
- "nvim-lspconfig": { "branch": "master", "commit": "38de86f82efd9ba0881203767d6a8e1815abca28" },
+ "nvim-lspconfig": { "branch": "master", "commit": "7cb90cf656139dc59cf86206946ec85571671b5b" },
"nvim-spectre": { "branch": "master", "commit": "366f46fdd4a1593cc237aea13d5ef113739a472c" },
- "nvim-surround": { "branch": "main", "commit": "fa5b365e847909df35cea184e13b7b811f346cda" },
- "nvim-treesitter": { "branch": "master", "commit": "b91ae14fc3bb801c7ea69bc283fe860b32b5163d" },
+ "nvim-surround": { "branch": "main", "commit": "f1f0699a1d49f28e607ffa4361f1bbe757ac5ebc" },
+ "nvim-treesitter": { "branch": "master", "commit": "5c924407cf110e9da4f3ba02ffed127b4198ad89" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
"nvim-various-textobjs": { "branch": "main", "commit": "7fed632f50e62c12f3d765c3393b3504124f0e3c" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
@@ -46,7 +46,7 @@
"oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" },
"org-bullets.nvim": { "branch": "main", "commit": "3623e86e0fa6d07f45042f7207fc333c014bf167" },
"org-roam.nvim": { "branch": "main", "commit": "295fa650e157f52586473a763510f860323adeb9" },
- "orgmode": { "branch": "master", "commit": "4f6759fa0c032df62f51c450e6590d3d5c964909" },
+ "orgmode": { "branch": "master", "commit": "6c03b725285cdcb6fae26c6e465637fdbac4f32e" },
"persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
@@ -59,8 +59,8 @@
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-orgmode.nvim": { "branch": "main", "commit": "a8478496911e378868f44bd9fd5fd5ce5eeec57b" },
"telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" },
- "trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" },
- "ts-comments.nvim": { "branch": "main", "commit": "503864726e7d83034969e6d2c78aa6f1158fd03e" },
+ "trouble.nvim": { "branch": "main", "commit": "36545cb88fa999f211bfc341998f501803bf5434" },
+ "ts-comments.nvim": { "branch": "main", "commit": "e339090c076871069c00e488b11def49aaf4e413" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"venn.nvim": { "branch": "main", "commit": "b09c2f36ddf70b498281845109bedcf08a7e0de0" },
"vim-dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" },