Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eval module #243

Closed
Milly opened this issue May 7, 2024 · 1 comment
Closed

Add eval module #243

Milly opened this issue May 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Milly
Copy link
Contributor

Milly commented May 7, 2024

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" })
  }`);
}
@lambdalisue
Copy link
Member

Closed via #260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants