mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
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.
This commit is contained in:
5
runtime/lua/vim/_meta/api.lua
generated
5
runtime/lua/vim/_meta/api.lua
generated
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user