Skip to main content
Go to Latest
function nvim_select_popupmenu_item
import { nvim_select_popupmenu_item } from "https://deno.land/x/denops_std@v6.4.0/function/nvim/mod.ts";

Selects an item in the completion popup menu.

If neither ins-completion nor cmdline-completion popup menu is active this API call is silently ignored. Useful for an external UI using ui-popupmenu to control the popup menu with the mouse. Can also be used in a mapping; use <Cmd> :map-cmd or a Lua mapping to ensure the mapping doesn't end completion mode.

Parameters:

  • {item} Index (zero-based) of the item to select. Value of -1 selects nothing and restores the original text.
  • {insert} For ins-completion, whether the selection should be inserted in the buffer. Ignored for cmdline-completion.
  • {finish} Finish the completion and dismiss the popup menu. Implies {insert}.
  • {opts} Optional parameters. Reserved for future use.

Parameters

denops: Denops
item: unknown
insert: unknown
finish: unknown
opts: unknown

Returns

Promise<unknown>