mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
docs: small fixes
Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: HiPhish <hiphish@posteo.de> Co-authored-by: Julio B <julio.bacel@gmail.com> Co-authored-by: T727 <74924917+T-727@users.noreply.github.com> Co-authored-by: camoz <camoz@users.noreply.github.com> Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
This commit is contained in:
@@ -312,7 +312,7 @@ vim9['fn'] = (function()
|
||||
-- We do have vim9script ;) that's this plugin
|
||||
['vim9script'] = true,
|
||||
|
||||
-- Include some vim patches that are sometimes required by variuos vim9script plugins
|
||||
-- Include some vim patches that are sometimes required by various vim9script plugins
|
||||
-- that we implement via vim9jit
|
||||
[ [[patch-8.2.2261]] ] = true,
|
||||
[ [[patch-8.2.4257]] ] = true,
|
||||
|
||||
@@ -778,7 +778,7 @@ do
|
||||
-- some bugs, so fake the two-step dance for now.
|
||||
local matches
|
||||
|
||||
--- Omnifunc for completing lua values from from the runtime lua interpreter,
|
||||
--- Omnifunc for completing lua values from the runtime lua interpreter,
|
||||
--- similar to the builtin completion for the `:lua` command.
|
||||
---
|
||||
--- Activate using `set omnifunc=v:lua.vim.lua_omnifunc` in a lua buffer.
|
||||
|
||||
@@ -90,7 +90,7 @@ function vim.inspect_pos(bufnr, row, col, filter)
|
||||
nsmap[id] = name
|
||||
end
|
||||
|
||||
--- Convert an extmark tuple into a map-like table
|
||||
--- Convert an extmark tuple into a table
|
||||
--- @private
|
||||
local function to_map(extmark)
|
||||
extmark = {
|
||||
|
||||
@@ -913,7 +913,7 @@ end
|
||||
--- the `cmd` process. Not related to `root_dir`.
|
||||
---
|
||||
--- - cmd_env: (table) Environment flags to pass to the LSP on
|
||||
--- spawn. Must be specified using a map-like table.
|
||||
--- spawn. Must be specified using a table.
|
||||
--- Non-string values are coerced to string.
|
||||
--- Example:
|
||||
--- <pre>
|
||||
|
||||
@@ -361,7 +361,7 @@ local function tbl_extend(behavior, deep_extend, ...)
|
||||
return ret
|
||||
end
|
||||
|
||||
--- Merges two or more map-like tables.
|
||||
--- Merges two or more tables.
|
||||
---
|
||||
---@see |extend()|
|
||||
---
|
||||
@@ -369,13 +369,13 @@ end
|
||||
--- - "error": raise an error
|
||||
--- - "keep": use value from the leftmost map
|
||||
--- - "force": use value from the rightmost map
|
||||
---@param ... table Two or more map-like tables
|
||||
---@param ... table Two or more tables
|
||||
---@return table Merged table
|
||||
function vim.tbl_extend(behavior, ...)
|
||||
return tbl_extend(behavior, false, ...)
|
||||
end
|
||||
|
||||
--- Merges recursively two or more map-like tables.
|
||||
--- Merges recursively two or more tables.
|
||||
---
|
||||
---@see |vim.tbl_extend()|
|
||||
---
|
||||
@@ -385,7 +385,7 @@ end
|
||||
--- - "error": raise an error
|
||||
--- - "keep": use value from the leftmost map
|
||||
--- - "force": use value from the rightmost map
|
||||
---@param ... T2 Two or more map-like tables
|
||||
---@param ... T2 Two or more tables
|
||||
---@return T1|T2 (table) Merged table
|
||||
function vim.tbl_deep_extend(behavior, ...)
|
||||
return tbl_extend(behavior, true, ...)
|
||||
|
||||
@@ -882,10 +882,12 @@ end
|
||||
---@param cbs table An |nvim_buf_attach()|-like table argument with the following handlers:
|
||||
--- - `on_bytes` : see |nvim_buf_attach()|, but this will be called _after_ the parsers callback.
|
||||
--- - `on_changedtree` : a callback that will be called every time the tree has syntactical changes.
|
||||
--- It will only be passed one argument, which is a table of the ranges (as node ranges) that
|
||||
--- changed.
|
||||
--- It will be passed two arguments: a table of the ranges (as node ranges) that
|
||||
--- changed and the changed tree.
|
||||
--- - `on_child_added` : emitted when a child is added to the tree.
|
||||
--- - `on_child_removed` : emitted when a child is removed from the tree.
|
||||
--- - `on_detach` : emitted when the buffer is detached, see |nvim_buf_detach_event|.
|
||||
--- Takes one argument, the number of the buffer.
|
||||
--- @param recursive? boolean Apply callbacks recursively for all children. Any new children will
|
||||
--- also inherit the callbacks.
|
||||
function LanguageTree:register_cbs(cbs, recursive)
|
||||
|
||||
@@ -609,10 +609,10 @@ end
|
||||
---
|
||||
--- {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 relevant). {start_row} and {end_row} can be used to limit
|
||||
--- text of the buffer (if relevant). {start} and {stop} 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 omitted, the {start} and {end} row values are used from the given node.
|
||||
--- viewport). When omitted, the {start} and {stop} row values are used from the given node.
|
||||
---
|
||||
--- The iterator returns three values: a numeric id identifying the capture,
|
||||
--- the captured node, and metadata from any directives processing the match.
|
||||
|
||||
@@ -333,7 +333,7 @@ local function create_err_msg(v)
|
||||
return string.format('invalid version: %s (%s)', tostring(v), type(v))
|
||||
end
|
||||
|
||||
--- Parses and compares two version version objects (the result of |vim.version.parse()|, or
|
||||
--- Parses and compares two version objects (the result of |vim.version.parse()|, or
|
||||
--- specified literally as a `{major, minor, patch}` tuple, e.g. `{1, 0, 3}`).
|
||||
---
|
||||
--- Example:
|
||||
|
||||
Reference in New Issue
Block a user