aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/trouble.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/plugins/trouble.lua')
-rw-r--r--nvim/lua/plugins/trouble.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/nvim/lua/plugins/trouble.lua b/nvim/lua/plugins/trouble.lua
new file mode 100644
index 0000000..a49d906
--- /dev/null
+++ b/nvim/lua/plugins/trouble.lua
@@ -0,0 +1,24 @@
+local init = function()
+ local keymap = vim.keymap
+ keymap.set("n", "<Space>rd", ":Trouble diagnostics toggle<Enter>",
+ { noremap = true, silent = true, desc = "Diagnostics (Trouble)" }) -- Diagnostics
+ keymap.set("n", "<Space>rt", ":Trouble todo toggle<Enter>",
+ { noremap = true, silent = true, desc = "Todos (Trouble)" }) -- Todos
+ keymap.set("n", "<Space>ro", ":Trouble symbols toggle<Enter>",
+ { noremap = true, silent = true, desc = "Outline (Trouble)" }) -- Outline
+end
+
+local config = function()
+ require("trouble").setup({
+ use_diagnostic_signs = true
+ })
+end
+
+return {
+ "folke/trouble.nvim",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ lazy = true,
+ cmd = "Trouble",
+ init = init,
+ config = config
+}