Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: regenerate #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions runtime/doc/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ nvim_get_mode() *nvim_get_mode()*
{fast}

nvim_get_option({name}) *nvim_get_option()*
Gets an option value string.
Gets the global value of an option.

Parameters: ~
{name} Option name
Expand Down Expand Up @@ -1049,6 +1049,24 @@ nvim_get_option_info({name}) *nvim_get_option_info()*
Return: ~
Option Information

nvim_get_option_value({name}, {*opts}) *nvim_get_option_value()*
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. 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()|.

Parameters: ~
{name} Option name
{opts} Optional parameters
• scope: One of 'global' or 'local'. Analagous to
|:setglobal| and |:setlocal|, respectively.

Return: ~
Option value

nvim_get_proc({pid}) *nvim_get_proc()*
Gets info describing process `pid` .

Expand Down Expand Up @@ -1510,11 +1528,25 @@ nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()*
key is an error.

nvim_set_option({name}, {value}) *nvim_set_option()*
Sets an option value.
Sets the global value of an option.

Parameters: ~
{name} Option name
{value} New option value

*nvim_set_option_value()*
nvim_set_option_value({name}, {value}, {*opts})
Sets the value of an option. The behavior of this function
matches that of |:set|: for global-local options, both the
global and local value are set unless otherwise specified with
{scope}.

Parameters: ~
{name} Option name
{value} New option value
{opts} Optional parameters
• scope: One of 'global' or 'local'. Analagous to
|:setglobal| and |:setlocal|, respectively.

nvim_set_var({name}, {value}) *nvim_set_var()*
Sets a global (g:) variable.
Expand Down
6 changes: 6 additions & 0 deletions runtime/doc/lsp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,12 @@ client() *vim.lsp.client*
server.
• {handlers} (table): The handlers used by the client as
described in |lsp-handler|.
• {requests} (table): The current pending requests in flight
to the server. Entries are key-value pairs with the key
being the request ID while the value is a table with
`type` , `bufnr` , and `method` key-value pairs. `type` is
either "pending" for an active request, or "cancel" for a
cancel request.
• {config} (table): copy of the table that was passed by the
user to |vim.lsp.start_client()|.
• {server_capabilities} (table): Response from the server
Expand Down
14 changes: 8 additions & 6 deletions runtime/doc/lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1607,12 +1607,14 @@ validate({opt}) *vim.validate()*

vim.validate{arg1={{'foo'}, 'table'}, arg2={'foo', 'string'}}
=> NOP (success)

vim.validate{arg1={1, 'table'}}
=> error('arg1: expected table, got number')

vim.validate{arg1={3, function(a) return (a % 2) == 0 end, 'even number'}}
=> error('arg1: expected even number, got 3')
<
>
vim.validate{arg1={1, 'table'}}
=> error('arg1: expected table, got number')
<
>
vim.validate{arg1={3, function(a) return (a % 2) == 0 end, 'even number'}}
=> error('arg1: expected even number, got 3')
<

Parameters: ~
Expand Down