Skip to main content
Module

x/denops_std/function/mod.ts>complete_info

📚 Standard module for denops.vim
Go to Latest
function complete_info
import { complete_info } from "https://deno.land/x/denops_std@v3.6.0/function/mod.ts";

Returns a |Dictionary| with information about Insert mode completion. See |ins-completion|. The items are: mode Current completion mode name string. See |complete_info_mode| for the values. pum_visible |TRUE| if popup menu is visible. See |pumvisible()|. items List of completion matches. Each item is a dictionary containing the entries "word", "abbr", "menu", "kind", "info" and "user_data". See |complete-items|. selected Selected item index. First index is zero. Index is -1 if no item is selected (showing typed text only) inserted Inserted string. [NOT IMPLEMENT YET] mode values are: "" Not in completion mode "keyword" Keyword completion |i_CTRL-X_CTRL-N| "ctrl_x" Just pressed CTRL-X |i_CTRL-X| "whole_line" Whole lines |i_CTRL-X_CTRL-L| "files" File names |i_CTRL-X_CTRL-F| "tags" Tags |i_CTRL-X_CTRL-]| "path_defines" Definition completion |i_CTRL-X_CTRL-D| "path_patterns" Include completion |i_CTRL-X_CTRL-I| "dictionary" Dictionary |i_CTRL-X_CTRL-K| "thesaurus" Thesaurus |i_CTRL-X_CTRL-T| "cmdline" Vim Command line |i_CTRL-X_CTRL-V| "function" User defined completion |i_CTRL-X_CTRL-U| "omni" Omni completion |i_CTRL-X_CTRL-O| "spell" Spelling suggestions |i_CTRL-X_s| "eval" |complete()| completion "unknown" Other internal modes If the optional {what} list argument is supplied, then only the items listed in {what} are returned. Unsupported items in {what} are silently ignored. To get the position and size of the popup menu, see |pum_getpos()|. It's also available in |v:event| during the |CompleteChanged| event. Examples: " Get all items call complete_info() " Get only 'mode' call complete_info(['mode']) " Get only 'mode' and 'pum_visible' call complete_info(['mode', 'pum_visible']) Can also be used as a |method|: GetItems()->complete_info()

Parameters

denops: Denops
optional
what: unknown

Returns

Promise<unknown>