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

x/denops_std/function/nvim/mod.ts>nvim_get_option_value

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

Gets the value of an option. The behavior of this function matches that of :set: the local value of an option is returned if it exists; otherwise, the global value is returned. Local values always correspond to the current buffer or window, unless "buf" or "win" is set in {opts}.

Parameters:

  • {name} Option name
  • {opts} Optional parameters - scope: One of "global" or "local". Analogous to :setglobal and :setlocal, respectively. - win: window-ID. Used for getting window local options. - buf: Buffer number. Used for getting buffer local options. Implies {scope} is "local". - filetype: filetype. Used to get the default option for a specific filetype. Cannot be used with any other option. Note: this will trigger ftplugin and all FileType autocommands for the corresponding filetype.

Return: Option value

Parameters

denops: Denops
name: unknown
opts: unknown

Returns

Promise<unknown>