diff --git a/README.md b/README.md index 77eadec..3ef5a1f 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Minimal Neovim configuration, focused mostly in just coding and text editing. - [ ] Bundle and use default formatters for when no one is available on `PATH`; - [ ] Better stylize the editor (mainly pop-overs and hover menus); - [ ] Remove `tfm.nvim` and use Neovim APIs to do the same features. +- [ ] Better integration and usage of the Quickfix list with [`trouble.nvim`](https://giitihub.com/folke/trouble.nvim) ## Using diff --git a/lua/dot013/plugins/lsp.lua b/lua/dot013/plugins/lsp.lua index 88a3cd5..633bfd7 100644 --- a/lua/dot013/plugins/lsp.lua +++ b/lua/dot013/plugins/lsp.lua @@ -122,4 +122,40 @@ return { }, }, }, + + -- Quickfix list and diagnostics + { + "trouble.nvim", + cmd = { "Trouble" }, + keys = { + { + "t", + "Trouble diagnostics toggle filter.buf=0", + desc = "[Trouble] Buffer diagnostics", + }, + { + "te", + "Trouble diagnostics toggle filter.buf=0 severity=viimi.diagnostics.severity.ERROR", + desc = "[Trouble] Buffer diagnostics", + }, + { + "la", + "Trouble lsp toggle focus=false win.position=right win.type=split", + desc = "[Trouble] All LSP Definitions & references", + }, + { + "s", + "Trouble symbols toggle focus=false win.position=right win.type=split", + desc = "[Trouble] Symbols", + }, + { + "q", + "Trouble qflist toggle", + desc = "[Trouble] Quickfix list", + }, + }, + after = function() + require("trouble").setup() + end, + }, } diff --git a/neovim.nix b/neovim.nix index 87780a0..3fcbf29 100644 --- a/neovim.nix +++ b/neovim.nix @@ -47,6 +47,7 @@ nvim-web-devicons telescope-nvim telescope-fzf-native-nvim + trouble-nvim tmux-nvim vim-sleuth