Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.foldlevel

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.foldlevel
import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { foldlevel } = fn;

The result is a Number, which is the foldlevel of line {lnum} in the current buffer. For nested folds the deepest level is returned. If there is no fold at line {lnum}, zero is returned. It doesn't matter if the folds are open or closed. When used while updating folds (from 'foldexpr') -1 is returned for lines where folds are still to be updated and the foldlevel is unknown. As a special case the level of the previous line is usually available. {lnum} is used like with getline(). Thus "." is the current line, "'m" mark m, etc.

Can also be used as a method:

GetLnum()->foldlevel()

Parameters

denops: Denops
lnum: unknown

Returns

Promise<number>