Skip to main content
Module

x/ddc_vim/deps.ts>fn.getcompletion

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.getcompletion
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { getcompletion } = fn;

Return a list of command-line completion matches. {type} specifies what for. The following completion types are supported: arglist file names in argument list augroup autocmd groups buffer buffer names behave :behave suboptions color color schemes command Ex command (and arguments) cmdline |cmdline-completion| result compiler compilers cscope |:cscope| suboptions diff_buffer |:diffget| and |:diffput| completion dir directory names environment environment variable names event autocommand events expression Vim expression file file and directory names file_in_path file and directory names in |'path'| filetype filetype names |'filetype'| function function name help help subjects highlight highlight groups history :history suboptions locale locale names (as output of locale -a) mapclear buffer argument mapping mapping name menu menus messages |:messages| suboptions option options packadd optional package |pack-add| names shellcmd Shell command sign |:sign| suboptions syntax syntax file names |'syntax'| syntime |:syntime| suboptions tag tags tag_listfiles tags, file names user user names var user variables If {pat} is an empty string, then all the matches are returned. Otherwise only items matching {pat} are returned. See |wildcards| for the use of special characters in {pat}. If the optional {filtered} flag is set to 1, then 'wildignore' is applied to filter the results. Otherwise all the matches are returned. The 'wildignorecase' option always applies. If {type} is "cmdline", then the |cmdline-completion| result is returned. For example, to complete the possible values after a ":call" command: echo getcompletion('call ', 'cmdline') If there are no matches, an empty list is returned. An invalid value for {type} produces an error. Can also be used as a |method|: GetPattern()->getcompletion('color')

Parameters

denops: Denops
pat: unknown
type: unknown
optional
filtered: unknown

Returns

Promise<unknown>