Submitted PR to lspsaga for jumping into window of hover doc instantly,

use my fork until PR gets merged.
This commit is contained in:
Martin Larsson 2025-01-14 23:51:32 +01:00
parent fea8eedad8
commit d85cc750cd
2 changed files with 10 additions and 14 deletions

View file

@ -1,13 +1,16 @@
return {
"nvimdev/lspsaga.nvim",
-- "nvimdev/lspsaga.nvim",
"LarssonMartin1998/lspsaga.nvim", -- Use my own fork until PR's are merged
event = "LspAttach",
lazy = true,
-- dir = "~/dev/git/lspsaga.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
after = "nvim-lspconfig",
config = function()
require("lspsaga").setup({
request_timeout = 750,
symbol_in_winbar = {
enable = false,
},
@ -24,22 +27,16 @@ return {
},
code_action = {
extend_gitsigns = true
}
},
hover = {
jump_on_first_press = true
},
})
local keymaps = {
n = {
["K"] = {
-- 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
cmd = ":Lspsaga hover_doc<CR>"
},
["<leader>rn"] = {
cmd = ":Lspsaga rename<CR>"