Add lspsaga hack for better experience using hover_doc.
This commit is contained in:
parent
55aade1657
commit
df6c46b5fb
1 changed files with 10 additions and 1 deletions
|
|
@ -30,7 +30,16 @@ return {
|
||||||
local keymaps = {
|
local keymaps = {
|
||||||
n = {
|
n = {
|
||||||
["K"] = {
|
["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"] = {
|
["<leader>rn"] = {
|
||||||
cmd = ":Lspsaga rename<CR>"
|
cmd = ":Lspsaga rename<CR>"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue