diff --git a/home/.config/nvim/lua/plugs/lspsaga.lua b/home/.config/nvim/lua/plugs/lspsaga.lua index 71b5017..9472b0a 100644 --- a/home/.config/nvim/lua/plugs/lspsaga.lua +++ b/home/.config/nvim/lua/plugs/lspsaga.lua @@ -30,7 +30,16 @@ return { local keymaps = { n = { ["K"] = { - cmd = ":Lspsaga hover_doc" + -- Awful hack to make sure the hover_doc window is closed when pressing q + -- This forces you to jump into the hover_doc window because running the same command when the window is open makes you jump into it, and inside of it q closes the window. + cmd = function() + vim.schedule(function() + vim.cmd("Lspsaga hover_doc") + vim.defer_fn(function() + vim.cmd("Lspsaga hover_doc") + end, 75) + end) + end }, ["rn"] = { cmd = ":Lspsaga rename"