mirror of
https://github.com/neovim/neovim.git
synced 2026-05-03 12:35:00 +00:00
feat(ui): completeopt support popup like vim
This commit is contained in:
10
runtime/lua/vim/_meta/api.lua
generated
10
runtime/lua/vim/_meta/api.lua
generated
@@ -773,6 +773,16 @@ function vim.api.nvim_command(command) end
|
||||
--- @return string
|
||||
function vim.api.nvim_command_output(command) end
|
||||
|
||||
--- Set info for the completion candidate index. if the info was shown in a
|
||||
--- window, then the window and buffer ids are returned for further
|
||||
--- customization. If the text was not shown, an empty dict is returned.
|
||||
---
|
||||
--- @param index integer the completion candidate index
|
||||
--- @param opts vim.api.keyset.complete_set Optional parameters.
|
||||
--- • info: (string) info text.
|
||||
--- @return table<string,any>
|
||||
function vim.api.nvim_complete_set(index, opts) end
|
||||
|
||||
--- Create or get an autocommand group `autocmd-groups`.
|
||||
--- To get an existing group id, do:
|
||||
---
|
||||
|
||||
3
runtime/lua/vim/_meta/api_keysets.lua
generated
3
runtime/lua/vim/_meta/api_keysets.lua
generated
@@ -68,6 +68,9 @@ error('Cannot require a meta file')
|
||||
--- @class vim.api.keyset.cmd_opts
|
||||
--- @field output? boolean
|
||||
|
||||
--- @class vim.api.keyset.complete_set
|
||||
--- @field info? string
|
||||
|
||||
--- @class vim.api.keyset.context
|
||||
--- @field types? any[]
|
||||
|
||||
|
||||
4
runtime/lua/vim/_meta/options.lua
generated
4
runtime/lua/vim/_meta/options.lua
generated
@@ -1061,6 +1061,10 @@ vim.bo.cfu = vim.bo.completefunc
|
||||
--- select one from the menu. Only works in combination with
|
||||
--- "menu" or "menuone".
|
||||
---
|
||||
--- popup Show extra information about the currently selected
|
||||
--- completion in a popup window. Only works in combination
|
||||
--- with "menu" or "menuone". Overrides "preview".
|
||||
---
|
||||
--- @type string
|
||||
vim.o.completeopt = "menu,preview"
|
||||
vim.o.cot = vim.o.completeopt
|
||||
|
||||
2
runtime/lua/vim/_meta/vimfn.lua
generated
2
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -1024,6 +1024,8 @@ function vim.fn.complete_check() end
|
||||
--- no item is selected when using the <Up> or
|
||||
--- <Down> keys)
|
||||
--- inserted Inserted string. [NOT IMPLEMENTED YET]
|
||||
--- preview_winid Info floating preview window id.
|
||||
--- preview_bufnr Info floating preview buffer id.
|
||||
---
|
||||
--- *complete_info_mode*
|
||||
--- mode values are:
|
||||
|
||||
Reference in New Issue
Block a user