From 653e57198a55a8c89b8a8c198171e178c81290a7 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Fri, 5 Jul 2024 16:51:13 +0200 Subject: [PATCH] Add comment to explain trouble workaround --- home/.config/nvim/lua/plugs/trouble.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/.config/nvim/lua/plugs/trouble.lua b/home/.config/nvim/lua/plugs/trouble.lua index b9bc33b..175ece4 100644 --- a/home/.config/nvim/lua/plugs/trouble.lua +++ b/home/.config/nvim/lua/plugs/trouble.lua @@ -2,6 +2,10 @@ local wm = require("window_management") local is_trouble_window = false +-- It seems like Trouble doesn't open up the window instantly when calling +-- the toggle/open function, or when calling it by the command. This is a workaround +-- to get the window autosizing working properly, when we tried to run it directly +-- afterwards it would autosize before the window was actually opened. local function setup_autosize_callback() local auname = "TroubleWinEnter" local augroup = vim.api.nvim_create_augroup(auname, { clear = true })