Skip to main content
Module

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

📚 Standard module for denops.vim
Go to Latest
function ch_sendexpr
import { ch_sendexpr } from "https://deno.land/x/denops_std@v6.4.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.

If the channel mode is "lsp", then returns a Dict. Otherwise returns an empty String. If the "callback" item is present in {options}, then the returned Dict contains the ID of the request message. The ID can be used to send a cancellation request to the LSP server (if needed). Returns an empty Dict on error.

If a response message is not expected for {expr}, then don't specify the "callback" item in {options}.

Can also be used as a method:

GetChannel()->ch_sendexpr(expr)

Parameters

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

Returns

Promise<unknown>