summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/api.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-04-29 15:55:00 +0200
committerGitHub <noreply@github.com>2025-04-29 15:55:00 +0200
commit08c484f2ca4b58e9eda07e194e9d096565db7144 (patch)
tree11bf4b019310a6b93855ad4d44296414a34a3b76 /runtime/lua/vim/_meta/api.lua
parent9bbbeb60e355844780db0aef955e860d68ac0342 (diff)
feat(ui): use builtin completion popupmenu with ext_cmdline (#31269)
Problem: UIs implementing ext_cmdline/message must also implement ext_popupmenu in order to get cmdline completion with wildoptions+=pum. Solution: Allow marking a window as the ext_cmdline window through nvim_open_win(), including prompt offset. Anchor the cmdline- completion popupmenu to this window.
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
-rw-r--r--runtime/lua/vim/_meta/api.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 8123ad4ceb..a97b5e2cc5 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -1771,8 +1771,7 @@ function vim.api.nvim_open_term(buffer, opts) end
--- - `row=0` and `col=0` if `anchor` is "SW" or "SE"
--- (thus like a tooltip near the buffer text).
--- - row: Row position in units of "screen cell height", may be fractional.
---- - col: Column position in units of "screen cell width", may be
---- fractional.
+--- - col: Column position in units of screen cell width, may be fractional.
--- - focusable: Enable focus by user actions (wincmds, mouse events).
--- Defaults to true. Non-focusable windows can be entered by
--- `nvim_set_current_win()`, or, when the `mouse` field is set to true,
@@ -1852,6 +1851,8 @@ function vim.api.nvim_open_term(buffer, opts) end
--- focused on it.
--- - vertical: Split vertically `:vertical`.
--- - split: Split direction: "left", "right", "above", "below".
+--- - _cmdline_offset: (EXPERIMENTAL) When provided, anchor the `cmdline-completion`
+--- popupmenu to this window, with an offset in screen cell width.
--- @return integer # |window-ID|, or 0 on error
function vim.api.nvim_open_win(buffer, enter, config) end