feat(api): add "buf" and "win" to nvim_get_option_value

These mirror their counterparts in nvim_set_option_value.
This commit is contained in:
Gregory Anders
2022-06-20 08:20:06 -06:00
parent 605631ac29
commit 58d028f64b
3 changed files with 99 additions and 11 deletions

View File

@@ -2037,15 +2037,17 @@ nvim_get_option_value({name}, {*opts}) *nvim_get_option_value()*
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. To get a buffer-local or window-local option for a
specific buffer or window, use |nvim_buf_get_option()| or
|nvim_win_get_option()|.
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
• 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".
Return: ~
Option value