Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

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

๐Ÿ“š Standard module for denops.vim
Go to Latest
function ch_evalexpr
import { ch_evalexpr } from "https://deno.land/x/denops_std@v5.2.0/function/vim/mod.ts";

Send {expr} over {handle}. The {expr} is encoded according to the type of channel. The function cannot be used with a raw channel. See channel-use. {handle} can be a Channel or a Job that has a Channel. When using the "lsp" channel mode, {expr} must be a Dict.

{options} must be a Dictionary. It must not have a "callback" entry. It can have a "timeout" entry to specify the timeout for this specific request.

ch_evalexpr() waits for a response and returns the decoded expression. When there is an error or timeout it returns an empty String or, when using the "lsp" channel mode, returns an empty Dict.

Note that while waiting for the response, Vim handles other messages. You need to make sure this doesn't cause trouble.

Can also be used as a method:

GetChannel()->ch_evalexpr(expr)

Parameters

denops: Denops
handle: unknown
expr: unknown
optional
options: unknown

Returns

Promise<unknown>