import { type Lambda } from "https://deno.land/x/denops_std@v6.3.0/lambda/mod.ts";
Properties
readonly
id: IdentifierMethods
Create a Vim script expression to notify the lambda function
import type { Denops } from "https://deno.land/x/denops_std@v6.3.0/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.3.0/lambda/mod.ts";
export async function main(denops: Denops): Promise<void> {
const a = lambda.add(denops, () => {
// Do what ever you want.
});
await denops.cmd(`nmap <Space> <Cmd>call ${a.notify()}<CR>`);
}
Create a Vim script expression to request the lambda function
import type { Denops } from "https://deno.land/x/denops_std@v6.3.0/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.3.0/lambda/mod.ts";
export async function main(denops: Denops): Promise<void> {
const a = lambda.add(denops, () => {
// Do what ever you want.
});
await denops.cmd(`nmap <Space> <Cmd>call ${a.request()}<CR>`);
}
Dispose the lambda function
import type { Denops } from "https://deno.land/x/denops_std@v6.3.0/mod.ts";
import * as lambda from "https://deno.land/x/denops_std@v6.3.0/lambda/mod.ts";
export async function main(denops: Denops): Promise<void> {
const a = lambda.add(denops, () => {
// Do what ever you want.
});
// Dispose the lambda function manually
a.dispose();
}