From 55007b0264ebf5886caef614d585fb6002587a58 Mon Sep 17 00:00:00 2001 From: David Work Date: Tue, 9 Jul 2024 17:49:18 +0900 Subject: [PATCH] trouble hotkeys enabled (correctly this time) --- lua/plugins/trouble.lua | 47 +++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index 535ab30..c426221 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -1,18 +1,39 @@ return { { "folke/trouble.nvim", - config = function() - vim.keymap.set("n", "xx", function() - trouble.toggle("workspace_diagnostics") - end, { desc = "Toggle Trouble" }) - vim.keymap.set("n", "xq", function() - trouble.toggle("quickfix") - end, { desc = "Toggle [Q]uickfix list" }) - vim.keymap.set("n", "xl", function() - trouble.toggle("loclist") - end, { desc = "Toggle [L]oc list" }) - end, - opts = { - } + config = true, + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, + opts = {} }, }