From 02f086f73f1ca51b5fc47b2ae41253c4323d345f Mon Sep 17 00:00:00 2001 From: SamPosh Date: Fri, 5 May 2023 18:46:53 +0530 Subject: [PATCH] Create trouble.lua added trouble plugin --- lua/custom/plugins/trouble.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lua/custom/plugins/trouble.lua diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua new file mode 100644 index 00000000..1395148f --- /dev/null +++ b/lua/custom/plugins/trouble.lua @@ -0,0 +1,14 @@ +return { +"folke/trouble.nvim", + config = function() + require("trouble").setup {} + + -- Define keybindings + vim.api.nvim_set_keymap("n", "xx", "Trouble", {silent = true, noremap = true}) + vim.api.nvim_set_keymap("n", "xt", "TroubleToggle", {silent = true, noremap = true}) + vim.api.nvim_set_keymap("n", "xw", "Trouble lsp_workspace_diagnostics", {silent = true, noremap = true}) + vim.api.nvim_set_keymap("n", "xd", "Trouble lsp_document_diagnostics", {silent = true, noremap = true}) + vim.api.nvim_set_keymap("n", "xl", "Trouble loclist", {silent = true, noremap = true}) + vim.api.nvim_set_keymap("n", "xq", "Trouble quickfix", {silent = true, noremap = true}) + end +}