Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/variable/option.ts>localOptions

๐Ÿ“š Standard module for denops.vim
Go to Latest
variable localOptions
import { localOptions } from "https://deno.land/x/denops_std@v6.4.0/variable/option.ts";

Local options (localOptions or lo)

import type { Denops } from "https://deno.land/x/denops_std@v6.4.0/mod.ts";
import { localOptions } from "https://deno.land/x/denops_std@v6.4.0/variable/mod.ts";

export async function main(denops: Denops): Promise<void> {
  // Set option
  await localOptions.set(denops, "filetype", "world");

  // Get option
  console.log(await localOptions.get(denops, "filetype"));

  // Reset option
  await localOptions.remove(denops, "filetype");
}

Note that localOptions.get() returns defaultValue when the option is falsy.