From 4ba6f44dc17fc047b819946b9189404121b26589 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 28 Sep 2023 11:23:25 -0500 Subject: [PATCH] refactor(nvim): improve trouble.nvim integration with quickfix --- dots/.config/nvim/lua/plugins/configs/trouble.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dots/.config/nvim/lua/plugins/configs/trouble.lua b/dots/.config/nvim/lua/plugins/configs/trouble.lua index ab8c2e4f..d3d2f214 100644 --- a/dots/.config/nvim/lua/plugins/configs/trouble.lua +++ b/dots/.config/nvim/lua/plugins/configs/trouble.lua @@ -40,9 +40,17 @@ return { }, dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() + vim.api.nvim_create_autocmd("QuickFixCmdPost", { + callback = function () + vim.cmd("Trouble quickfix") + end + }) require("trouble").setup({ auto_close = true, position = "right", + action_keys = { + cancel = "q" + } }) vim.api.nvim_create_autocmd("BufLeave", { pattern = "*Trouble*",