import { options } from "https://deno.land/x/denops_std@v6.5.1/variable/mod.ts";
Options (options
or o
)
import type { Entrypoint } from "https://deno.land/x/denops_std@v6.5.1/mod.ts";
import { options } from "https://deno.land/x/denops_std@v6.5.1/variable/mod.ts";
export const main: Entrypoint = async (denops) => {
// Set option
await options.set(denops, "filetype", "world");
// Get option
console.log(await options.get(denops, "filetype"));
// Reset option
await options.remove(denops, "filetype");
}
Note that options.get()
returns defaultValue
when the option is falsy.