Skip to main content
Module

x/ddc_vim/deps.ts>fn.synstack

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

Return a |List|, which is the stack of syntax items at the position {lnum} and {col} in the current window. Each item in the List is an ID like what |synID()| returns. The first item in the List is the outer region, following are items contained in that one. The last one is what |synID()| returns, unless not the whole item is highlighted or it is a transparent item. This function is useful for debugging a syntax file. Example that shows the syntax stack under the cursor: for id in synstack(line("."), col(".")) echo synIDattr(id, "name") endfor When the position specified with {lnum} and {col} is invalid nothing is returned. The position just after the last character in a line and the first column in an empty line are valid positions.

Parameters

denops: Denops
lnum: unknown
col: unknown

Returns

Promise<unknown>