mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
docs: regenerate (#16390)
Co-authored-by: marvim <marvim@users.noreply.github.com>
This commit is contained in:
parent
caa6992a10
commit
b51b0aecc9
@ -1851,7 +1851,7 @@ nvim_buf_call({buffer}, {fun}) *nvim_buf_call()*
|
|||||||
switched If a window inside the current tabpage (including a
|
switched If a window inside the current tabpage (including a
|
||||||
float) already shows the buffer One of these windows will be
|
float) already shows the buffer One of these windows will be
|
||||||
set as current window temporarily. Otherwise a temporary
|
set as current window temporarily. Otherwise a temporary
|
||||||
scratch window (calleed the "autocmd window" for historical
|
scratch window (called the "autocmd window" for historical
|
||||||
reasons) will be used.
|
reasons) will be used.
|
||||||
|
|
||||||
This is useful e.g. to call vimL functions that only work with
|
This is useful e.g. to call vimL functions that only work with
|
||||||
@ -2175,7 +2175,7 @@ nvim_buf_set_text({buffer}, {start_row}, {start_col}, {end_row}, {end_col},
|
|||||||
Parameters: ~
|
Parameters: ~
|
||||||
{buffer} Buffer handle, or 0 for current buffer
|
{buffer} Buffer handle, or 0 for current buffer
|
||||||
{start_row} First line index
|
{start_row} First line index
|
||||||
{start_column} Last column
|
{start_column} First column
|
||||||
{end_row} Last line index
|
{end_row} Last line index
|
||||||
{end_column} Last column
|
{end_column} Last column
|
||||||
{replacement} Array of lines to use as replacement
|
{replacement} Array of lines to use as replacement
|
||||||
@ -2500,7 +2500,7 @@ nvim_set_decoration_provider({ns_id}, {opts})
|
|||||||
specific window. ["win", winid, bufnr, topline,
|
specific window. ["win", winid, bufnr, topline,
|
||||||
botline_guess]
|
botline_guess]
|
||||||
• on_line: called for each buffer line being
|
• on_line: called for each buffer line being
|
||||||
redrawn. (The interation with fold lines is
|
redrawn. (The interaction with fold lines is
|
||||||
subject to change) ["win", winid, bufnr, row]
|
subject to change) ["win", winid, bufnr, row]
|
||||||
• on_end: called at the end of a redraw cycle
|
• on_end: called at the end of a redraw cycle
|
||||||
["end", tick]
|
["end", tick]
|
||||||
|
@ -439,7 +439,7 @@ get_namespace({namespace}) *vim.diagnostic.get_namespace()*
|
|||||||
Get namespace metadata.
|
Get namespace metadata.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{ns} number Diagnostic namespace
|
{namespace} number Diagnostic namespace
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
table Namespace metadata
|
table Namespace metadata
|
||||||
@ -508,6 +508,9 @@ goto_next({opts}) *vim.diagnostic.goto_next()*
|
|||||||
"true", call |vim.diagnostic.open_float()| after
|
"true", call |vim.diagnostic.open_float()| after
|
||||||
moving. If a table, pass the table as the {opts}
|
moving. If a table, pass the table as the {opts}
|
||||||
parameter to |vim.diagnostic.open_float()|.
|
parameter to |vim.diagnostic.open_float()|.
|
||||||
|
Unless overridden, the float will show
|
||||||
|
diagnostics at the new cursor position (as if
|
||||||
|
"cursor" were passed to the "scope" option).
|
||||||
• win_id: (number, default 0) Window ID
|
• win_id: (number, default 0) Window ID
|
||||||
|
|
||||||
goto_prev({opts}) *vim.diagnostic.goto_prev()*
|
goto_prev({opts}) *vim.diagnostic.goto_prev()*
|
||||||
|
@ -722,7 +722,7 @@ omnifunc({findstart}, {base}) *vim.lsp.omnifunc()*
|
|||||||
|CompleteDone|
|
|CompleteDone|
|
||||||
|
|
||||||
*vim.lsp.prepare()*
|
*vim.lsp.prepare()*
|
||||||
prepare({bufnr}, {firstline}, {lastline}, {new_lastline}, {changedtick})
|
prepare({bufnr}, {firstline}, {lastline}, {new_lastline})
|
||||||
TODO: Documentation
|
TODO: Documentation
|
||||||
|
|
||||||
reset({client_id}) *vim.lsp.reset()*
|
reset({client_id}) *vim.lsp.reset()*
|
||||||
@ -800,10 +800,11 @@ start_client({config}) *vim.lsp.start_client()*
|
|||||||
functions. Commands passed to
|
functions. Commands passed to
|
||||||
start_client take precedence over the
|
start_client take precedence over the
|
||||||
global command registry. Each key
|
global command registry. Each key
|
||||||
must be a unique comand name, and the
|
must be a unique command name, and
|
||||||
value is a function which is called
|
the value is a function which is
|
||||||
if any LSP action (code action, code
|
called if any LSP action (code
|
||||||
lenses, ...) triggers the command.
|
action, code lenses, ...) triggers
|
||||||
|
the command.
|
||||||
{init_options} Values to pass in the initialization
|
{init_options} Values to pass in the initialization
|
||||||
request as `initializationOptions` .
|
request as `initializationOptions` .
|
||||||
See `initialize` in the LSP spec.
|
See `initialize` in the LSP spec.
|
||||||
@ -1369,7 +1370,7 @@ buf_highlight_references({bufnr}, {references}, {offset_encoding})
|
|||||||
See also: ~
|
See also: ~
|
||||||
https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight
|
https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight
|
||||||
|
|
||||||
buf_lines({bufnr}) *vim.lsp.util.buf_lines()*
|
buf_lines() *vim.lsp.util.buf_lines()*
|
||||||
TODO: Documentation
|
TODO: Documentation
|
||||||
|
|
||||||
*vim.lsp.util.character_offset()*
|
*vim.lsp.util.character_offset()*
|
||||||
@ -1849,7 +1850,8 @@ rpc_response_error({code}, {message}, {data})
|
|||||||
*vim.lsp.rpc.start()*
|
*vim.lsp.rpc.start()*
|
||||||
start({cmd}, {cmd_args}, {dispatchers}, {extra_spawn_params})
|
start({cmd}, {cmd_args}, {dispatchers}, {extra_spawn_params})
|
||||||
Starts an LSP server process and create an LSP RPC client
|
Starts an LSP server process and create an LSP RPC client
|
||||||
object to interact with it.
|
object to interact with it. Communication with the server is
|
||||||
|
currently limited to stdio.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{cmd} (string) Command to start the LSP
|
{cmd} (string) Command to start the LSP
|
||||||
|
@ -1324,7 +1324,7 @@ deepcopy({orig}) *vim.deepcopy()*
|
|||||||
and will throw an error.
|
and will throw an error.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{orig} Table to copy
|
{orig} table Table to copy
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
New table of copied keys and (nested) values.
|
New table of copied keys and (nested) values.
|
||||||
@ -1613,12 +1613,14 @@ validate({opt}) *vim.validate()*
|
|||||||
|
|
||||||
vim.validate{arg1={{'foo'}, 'table'}, arg2={'foo', 'string'}}
|
vim.validate{arg1={{'foo'}, 'table'}, arg2={'foo', 'string'}}
|
||||||
=> NOP (success)
|
=> NOP (success)
|
||||||
|
<
|
||||||
vim.validate{arg1={1, 'table'}}
|
>
|
||||||
=> error('arg1: expected table, got number')
|
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={3, function(a) return (a % 2) == 0 end, 'even number'}}
|
||||||
|
=> error('arg1: expected even number, got 3')
|
||||||
<
|
<
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
|
@ -353,7 +353,7 @@ Lua module: vim.treesitter *lua-treesitter-core*
|
|||||||
get_parser({bufnr}, {lang}, {opts}) *get_parser()*
|
get_parser({bufnr}, {lang}, {opts}) *get_parser()*
|
||||||
Gets the parser for this bufnr / ft combination.
|
Gets the parser for this bufnr / ft combination.
|
||||||
|
|
||||||
If needed this will create the parser. Unconditionnally attach
|
If needed this will create the parser. Unconditionally attach
|
||||||
the provided callback
|
the provided callback
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
@ -380,7 +380,7 @@ Lua module: vim.treesitter.language *treesitter-language*
|
|||||||
inspect_language({lang}) *inspect_language()*
|
inspect_language({lang}) *inspect_language()*
|
||||||
Inspects the provided language.
|
Inspects the provided language.
|
||||||
|
|
||||||
Inspecting provides some useful informations on the language
|
Inspecting provides some useful information on the language
|
||||||
like node names, ...
|
like node names, ...
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
@ -479,7 +479,7 @@ Query:iter_captures({self}, {node}, {source}, {start}, {stop})
|
|||||||
|
|
||||||
{source} is needed if the query contains predicates, then the
|
{source} is needed if the query contains predicates, then the
|
||||||
caller must ensure to use a freshly parsed tree consistent
|
caller must ensure to use a freshly parsed tree consistent
|
||||||
with the current text of the buffer (if relevent). {start_row}
|
with the current text of the buffer (if relevant). {start_row}
|
||||||
and {end_row} can be used to limit matches inside a row range
|
and {end_row} can be used to limit matches inside a row range
|
||||||
(this is typically used with root node as the node, i e to get
|
(this is typically used with root node as the node, i e to get
|
||||||
syntax highlight matches in the current viewport). When
|
syntax highlight matches in the current viewport). When
|
||||||
@ -503,8 +503,7 @@ Query:iter_captures({self}, {node}, {source}, {start}, {stop})
|
|||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{node} The node under which the search will occur
|
{node} The node under which the search will occur
|
||||||
{source} The source buffer or string to exctract text
|
{source} The source buffer or string to extract text from
|
||||||
from
|
|
||||||
{start} The starting line of the search
|
{start} The starting line of the search
|
||||||
{stop} The stopping line of the search (end-exclusive)
|
{stop} The stopping line of the search (end-exclusive)
|
||||||
{self}
|
{self}
|
||||||
@ -531,9 +530,11 @@ Query:iter_matches({self}, {node}, {source}, {start}, {stop})
|
|||||||
for id, node in pairs(match) do
|
for id, node in pairs(match) do
|
||||||
local name = query.captures[id]
|
local name = query.captures[id]
|
||||||
-- `node` was captured by the `name` capture in the match
|
-- `node` was captured by the `name` capture in the match
|
||||||
|
<
|
||||||
local node_data = metadata[id] -- Node level metadata
|
>
|
||||||
|
local node_data = metadata[id] -- Node level metadata
|
||||||
|
<
|
||||||
|
>
|
||||||
... use the info here ...
|
... use the info here ...
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -609,7 +610,7 @@ LanguageTree:children({self}) *LanguageTree:children()*
|
|||||||
{self}
|
{self}
|
||||||
|
|
||||||
LanguageTree:contains({self}, {range}) *LanguageTree:contains()*
|
LanguageTree:contains({self}, {range}) *LanguageTree:contains()*
|
||||||
Determines wether This goes down the tree to recursively check childs.
|
Determines whether This goes down the tree to recursively check children.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{range} is contained in this language tree
|
{range} is contained in this language tree
|
||||||
|
Loading…
Reference in New Issue
Block a user