Skip to main content
Module

x/ddc_vim/deps.ts>fn.has

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

Returns 1 if {feature} is supported, 0 otherwise. The {feature} argument is a feature name like "nvim-0.2.1" or "win32", see below. See also |exists()|.

Vim's compile-time feature-names (prefixed with "+") are not recognized because Nvim is always compiled with all possible features. |feature-compile|

Feature names can be:

  1. Nvim version. For example the "nvim-0.2.1" feature means that Nvim is version 0.2.1 or later: :if has("nvim-0.2.1")

  2. Runtime condition or other pseudo-feature. For example the "win32" feature checks if the current system is Windows: :if has("win32") feature-list List of supported pseudo-feature names: acl |ACL| support iconv Can use |iconv()| for conversion. +shellslash Can use backslashes in filenames (Windows) clipboard |clipboard| provider is available. nvim This is Nvim. python2 Legacy Vim |python2| interface. |has-python| python3 Legacy Vim |python3| interface. |has-python| pythonx Legacy Vim |python_x| interface. |has-pythonx| ttyin input is a terminal (tty) ttyout output is a terminal (tty) unix Unix system. vim_starting True during |startup|. win32 Windows system (32 or 64 bit). wsl WSL (Windows Subsystem for Linux) system

    			*has-patch*
    
  3. Vim patch. For example the "patch123" feature means that Vim patch 123 at the current |v:version| was included: :if v:version > 602 || v:version == 602 && has("patch148")

  4. Vim version. For example the "patch-7.4.237" feature means that Nvim is Vim-compatible to version 7.4.237 or later. :if has("patch-7.4.237")

Parameters

denops: Denops
feature: string
optional
check: boolean

Returns

Promise<boolean>