mirror of
https://github.com/neovim/neovim.git
synced 2026-04-27 01:34:16 +00:00
feat(lsp): add 'focus' option to open_floating_preview (#16465)
When the 'focusable' and 'focus_id' parameters are set, `open_floating_preview` assumes that it should always move focus to an existing floating window with the same 'focus_id'. However, there are cases where we want to make a floating window focusable, but do not want to focus it upon calling `open_floating_preview`. To distinguish these cases, add a boolean parameter 'focus' that, when false, prevents moving focus.
This commit is contained in:
@@ -520,7 +520,7 @@ local function diagnostic_move_pos(opts, pos)
|
||||
vim.api.nvim_win_get_buf(win_id),
|
||||
vim.tbl_extend("keep", float_opts, {
|
||||
scope = "cursor",
|
||||
focusable = false,
|
||||
focus = false,
|
||||
})
|
||||
)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user