deno-denops-std
deno-denops-std copied to clipboard
Add `eval` module
I want to refactor helper/expr_string and rename it into an eval module.
Also, I would like to be able to collaborate with Lambda.
Usage example:
import type { Denops } from "https://deno.land/x/denops_std/mod.ts";
import { evalQuote, exprQuote } from "https://deno.land/x/denops_std/eval/mod.ts";
import * as lambda from "https://deno.land/x/denops_std/lambda/mod.ts";
export async function main(denops: Denops): Promise<void> {
const a = lambda.add(denops, (cword: unknown, context: unknown) => {
// nice code
return exprQuote`\<Ignore>`;
});
await denops.cmd(`nmap <expr> <Space> ${
a.request(evalQuote`expand("<cword>")`, { cid: "foo" })
}`);
}