Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lua/lspsaga/hover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ function hover:open_floating_preview(content, option_fn)
pcall(util.delete_scroll_map, curbuf)
end,
})

if config.hover.jump_on_first_press then
api.nvim_set_current_win(self.winid)
end
end

local function ignore_error(args, can_through)
Expand Down
1 change: 1 addition & 0 deletions lua/lspsaga/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local default_config = {
max_height = 0.8,
open_link = 'gx',
open_cmd = '!chrome',
jump_on_first_press = false,
},
diagnostic = {
show_layout = 'float',
Expand Down
1 change: 1 addition & 0 deletions lua/lspsaga/luadoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
---@field max_height? number Defines float window height
---@field open_link? string Key for opening links
---@field open_cmd? string Cmd for opening links
---@field jump_on_first_press? boolean Jump directly into the hover window on the first press instead of the default two presses.

---@class LspsagaConfig.Diagnostic
---@field show_layout? LayoutOption Config layout of diagnostic window not jump window
Expand Down
Loading