import { vars } from "https://deno.land/x/ddc_vim@v4.3.0/deps.ts";
const { globalOptions } = vars;
Global options (globalOptions
or go
)
import { Denops } from "../mod.ts";
import { globalOptions } from "../variable/mod.ts";
export async function main(denops: Denops): Promise<void> {
// Set option
await globalOptions.set(denops, "filetype", "world");
// Get option
console.log(await globalOptions.get(denops, "filetype"));
// Reset option
await globalOptions.remove(denops, "filetype");
}
Note that globalOption.get()
returns defaultValue
when the option is falsy.