From 0fa63603afcb9b478c49a54d94314d20af00ae95 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis Date: Mon, 22 Apr 2024 10:56:00 +0300 Subject: [PATCH] fix(trouble_v3): keymap `previous` is deprecated, use `prev` instead (#2968) --- lua/lazyvim/plugins/extras/editor/trouble-v3.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/trouble-v3.lua b/lua/lazyvim/plugins/extras/editor/trouble-v3.lua index 6c964909..8a40498f 100644 --- a/lua/lazyvim/plugins/extras/editor/trouble-v3.lua +++ b/lua/lazyvim/plugins/extras/editor/trouble-v3.lua @@ -29,6 +29,20 @@ return { }, { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, + { + "[q", + function() + if require("trouble").is_open() then + require("trouble").prev({ skip_groups = true, jump = true }) + else + local ok, err = pcall(vim.cmd.cprev) + if not ok then + vim.notify(err, vim.log.levels.ERROR) + end + end + end, + desc = "Previous Trouble/Quickfix Item", + }, }, },