Skip to main content
Module

x/denops_std/function/vim/mod.ts>luaeval

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

Evaluate Lua expression {expr} and return its result converted to Vim data structures. Second {expr} may hold additional argument accessible as _A inside first {expr}. Strings are returned as they are. Boolean objects are converted to numbers. Numbers are converted to Float values. Dictionaries and lists obtained by vim.eval() are returned as-is. Other objects are returned as zero without any errors. See lua-luaeval for more details. Note that in a :def function local variables are not visible to {expr}.

Can also be used as a method:

GetExpr()->luaeval()

only available when compiled with the +lua feature

Parameters

denops: Denops
expr1: unknown
optional
expr2: unknown

Returns

Promise<unknown>