Add lspsaga hack for better experience using hover_doc.

This commit is contained in:
Martin Larsson 2025-01-14 11:47:53 +01:00
parent 55aade1657
commit df6c46b5fb

View file

@ -30,7 +30,16 @@ return {
local keymaps = {
n = {
["K"] = {
cmd = ":Lspsaga hover_doc<CR>"
-- 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
},
["<leader>rn"] = {
cmd = ":Lspsaga rename<CR>"