mirror of
https://github.com/neovim/neovim
synced 2025-07-22 14:21:58 +00:00
docs: regenerate (#16390)
Co-authored-by: marvim <marvim@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
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
|
||||
float) already shows the buffer One of these windows will be
|
||||
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.
|
||||
|
||||
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: ~
|
||||
{buffer} Buffer handle, or 0 for current buffer
|
||||
{start_row} First line index
|
||||
{start_column} Last column
|
||||
{start_column} First column
|
||||
{end_row} Last line index
|
||||
{end_column} Last column
|
||||
{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,
|
||||
botline_guess]
|
||||
• 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]
|
||||
• on_end: called at the end of a redraw cycle
|
||||
["end", tick]
|
||||
|
@ -439,7 +439,7 @@ get_namespace({namespace}) *vim.diagnostic.get_namespace()*
|
||||
Get namespace metadata.
|
||||
|
||||
Parameters: ~
|
||||
{ns} number Diagnostic namespace
|
||||
{namespace} number Diagnostic namespace
|
||||
|
||||
Return: ~
|
||||
table Namespace metadata
|
||||
@ -508,6 +508,9 @@ goto_next({opts}) *vim.diagnostic.goto_next()*
|
||||
"true", call |vim.diagnostic.open_float()| after
|
||||
moving. If a table, pass the table as the {opts}
|
||||
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
|
||||
|
||||
goto_prev({opts}) *vim.diagnostic.goto_prev()*
|
||||
|
@ -722,7 +722,7 @@ omnifunc({findstart}, {base}) *vim.lsp.omnifunc()*
|
||||
|CompleteDone|
|
||||
|
||||
*vim.lsp.prepare()*
|
||||
prepare({bufnr}, {firstline}, {lastline}, {new_lastline}, {changedtick})
|
||||
prepare({bufnr}, {firstline}, {lastline}, {new_lastline})
|
||||
TODO: Documentation
|
||||
|
||||
reset({client_id}) *vim.lsp.reset()*
|
||||
@ -800,10 +800,11 @@ start_client({config}) *vim.lsp.start_client()*
|
||||
functions. Commands passed to
|
||||
start_client take precedence over the
|
||||
global command registry. Each key
|
||||
must be a unique comand name, and the
|
||||
value is a function which is called
|
||||
if any LSP action (code action, code
|
||||
lenses, ...) triggers the command.
|
||||
must be a unique command name, and
|
||||
the value is a function which is
|
||||
called if any LSP action (code
|
||||
action, code lenses, ...) triggers
|
||||
the command.
|
||||
{init_options} Values to pass in the initialization
|
||||
request as `initializationOptions` .
|
||||
See `initialize` in the LSP spec.
|
||||
@ -1369,7 +1370,7 @@ buf_highlight_references({bufnr}, {references}, {offset_encoding})
|
||||
See also: ~
|
||||
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
|
||||
|
||||
*vim.lsp.util.character_offset()*
|
||||
@ -1849,7 +1850,8 @@ rpc_response_error({code}, {message}, {data})
|
||||
*vim.lsp.rpc.start()*
|
||||
start({cmd}, {cmd_args}, {dispatchers}, {extra_spawn_params})
|
||||
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: ~
|
||||
{cmd} (string) Command to start the LSP
|
||||
|
@ -1324,7 +1324,7 @@ deepcopy({orig}) *vim.deepcopy()*
|
||||
and will throw an error.
|
||||
|
||||
Parameters: ~
|
||||
{orig} Table to copy
|
||||
{orig} table Table to copy
|
||||
|
||||
Return: ~
|
||||
New table of copied keys and (nested) values.
|
||||
@ -1613,12 +1613,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: ~
|
||||
|
@ -353,7 +353,7 @@ Lua module: vim.treesitter *lua-treesitter-core*
|
||||
get_parser({bufnr}, {lang}, {opts}) *get_parser()*
|
||||
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
|
||||
|
||||
Parameters: ~
|
||||
@ -380,7 +380,7 @@ Lua module: vim.treesitter.language *treesitter-language*
|
||||
inspect_language({lang}) *inspect_language()*
|
||||
Inspects the provided language.
|
||||
|
||||
Inspecting provides some useful informations on the language
|
||||
Inspecting provides some useful information on the language
|
||||
like node names, ...
|
||||
|
||||
Parameters: ~
|
||||
@ -479,7 +479,7 @@ Query:iter_captures({self}, {node}, {source}, {start}, {stop})
|
||||
|
||||
{source} is needed if the query contains predicates, then the
|
||||
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
|
||||
(this is typically used with root node as the node, i e to get
|
||||
syntax highlight matches in the current viewport). When
|
||||
@ -503,8 +503,7 @@ Query:iter_captures({self}, {node}, {source}, {start}, {stop})
|
||||
|
||||
Parameters: ~
|
||||
{node} The node under which the search will occur
|
||||
{source} The source buffer or string to exctract text
|
||||
from
|
||||
{source} The source buffer or string to extract text from
|
||||
{start} The starting line of the search
|
||||
{stop} The stopping line of the search (end-exclusive)
|
||||
{self}
|
||||
@ -531,9 +530,11 @@ Query:iter_matches({self}, {node}, {source}, {start}, {stop})
|
||||
for id, node in pairs(match) do
|
||||
local name = query.captures[id]
|
||||
-- `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 ...
|
||||
end
|
||||
end
|
||||
@ -609,7 +610,7 @@ LanguageTree:children({self}) *LanguageTree:children()*
|
||||
{self}
|
||||
|
||||
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: ~
|
||||
{range} is contained in this language tree
|
||||
|
Reference in New Issue
Block a user