From 18d16b4e702dd6f3a504068bca743df400c16ea4 Mon Sep 17 00:00:00 2001 From: Andreas Gerlach Date: Sat, 4 Feb 2023 10:15:57 +0100 Subject: [PATCH] use trouble quicklist / loclist if available --- lua/lazyvim/config/keymaps.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index a21d0b47..b4d868eb 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -91,8 +91,13 @@ map("n", "l", ":Lazy", { desc = "Lazy" }) -- new file map("n", "fn", "enew", { desc = "New File" }) -map("n", "xl", "lopen", { desc = "Open Location List" }) -map("n", "xq", "copen", { desc = "Open Quickfix List" }) +if Util.has("trouble.nvim") then + map("n", "xl", "Trouble loclist", { desc = "Open Location List (Trouble)" }) + map("n", "xq", "Trouble quickfix", { desc = "Open Quickfix List (Trouble)" }) +else + map("n", "xl", "lopen", { desc = "Open Location List" }) + map("n", "xq", "copen", { desc = "Open Quickfix List" }) +end -- stylua: ignore start