aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/diagnostic.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2021-11-29 15:37:55 -0700
committerGitHub <noreply@github.com>2021-11-29 15:37:55 -0700
commitfff8827908494a9c4bd5de10c409189929b3db56 (patch)
tree2eb6d3da035460f9d6254f5d89dadbd9a23ebad9 /runtime/lua/vim/diagnostic.lua
parentb16b7021efe905a0e69731ffa13e6d187fdddb8d (diff)
downloadrneovim-fff8827908494a9c4bd5de10c409189929b3db56.tar.gz
rneovim-fff8827908494a9c4bd5de10c409189929b3db56.tar.bz2
rneovim-fff8827908494a9c4bd5de10c409189929b3db56.zip
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.
Diffstat (limited to 'runtime/lua/vim/diagnostic.lua')
-rw-r--r--runtime/lua/vim/diagnostic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
index 9cc1914ed9..5c5631af98 100644
--- a/runtime/lua/vim/diagnostic.lua
+++ b/runtime/lua/vim/diagnostic.lua
@@ -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)