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 triggerftplugin
and allFileType
autocommands for the corresponding filetype.
Return: Option value