mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 22:21:30 +00:00
refactor(lua): use tuple syntax everywhere #29111
This commit is contained in:
@@ -393,11 +393,11 @@ Lua module: vim.diagnostic *diagnostic-api*
|
||||
by {count} diagnostics, while a negative integer moves
|
||||
backward by {count} diagnostics. Mutually exclusive
|
||||
with {diagnostic}.
|
||||
• {pos}? (`{[1]:integer,[2]:integer}`) Cursor position as a
|
||||
`(row, col)` tuple. See |nvim_win_get_cursor()|. Used
|
||||
to find the nearest diagnostic when {count} is used.
|
||||
Only used when {count} is non-nil. Default is the
|
||||
current cursor position.
|
||||
• {pos}? (`[integer,integer]`) Cursor position as a `(row, col)`
|
||||
tuple. See |nvim_win_get_cursor()|. Used to find the
|
||||
nearest diagnostic when {count} is used. Only used when
|
||||
{count} is non-nil. Default is the current cursor
|
||||
position.
|
||||
• {wrap}? (`boolean`, default: `true`) Whether to loop around
|
||||
file or not. Similar to 'wrapscan'.
|
||||
• {severity}? (`vim.diagnostic.SeverityFilter`) See
|
||||
@@ -467,18 +467,18 @@ Lua module: vim.diagnostic *diagnostic-api*
|
||||
current cursor position (`cursor`). Shorthand
|
||||
versions are also accepted (`c` for `cursor`, `l`
|
||||
for `line`, `b` for `buffer`).
|
||||
• {pos}? (`integer|{[1]:integer,[2]:integer}`) If {scope} is
|
||||
"line" or "cursor", use this position rather than
|
||||
the cursor position. If a number, interpreted as a
|
||||
line number; otherwise, a (row, col) tuple.
|
||||
• {pos}? (`integer|[integer,integer]`) If {scope} is "line"
|
||||
or "cursor", use this position rather than the
|
||||
cursor position. If a number, interpreted as a line
|
||||
number; otherwise, a (row, col) tuple.
|
||||
• {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false`)
|
||||
Sort diagnostics by severity. Overrides the setting
|
||||
from |vim.diagnostic.config()|.
|
||||
• {severity}? (`vim.diagnostic.SeverityFilter`) See
|
||||
|diagnostic-severity|. Overrides the setting from
|
||||
|vim.diagnostic.config()|.
|
||||
• {header}? (`string|{[1]:string,[2]:any}`) String to use as the
|
||||
header for the floating window. If a table, it is
|
||||
• {header}? (`string|[string,any]`) String to use as the header
|
||||
for the floating window. If a table, it is
|
||||
interpreted as a `[text, hl_group]` tuple. Overrides
|
||||
the setting from |vim.diagnostic.config()|.
|
||||
• {source}? (`boolean|'if_many'`) Include the diagnostic source
|
||||
@@ -591,8 +591,7 @@ Lua module: vim.diagnostic *diagnostic-api*
|
||||
<
|
||||
• {hl_mode}? (`'replace'|'combine'|'blend'`) See
|
||||
|nvim_buf_set_extmark()|.
|
||||
• {virt_text}? (`{[1]:string,[2]:any}[]`) See
|
||||
|nvim_buf_set_extmark()|.
|
||||
• {virt_text}? (`[string,any][]`) See |nvim_buf_set_extmark()|.
|
||||
• {virt_text_pos}? (`'eol'|'overlay'|'right_align'|'inline'`) See
|
||||
|nvim_buf_set_extmark()|.
|
||||
• {virt_text_win_col}? (`integer`) See |nvim_buf_set_extmark()|.
|
||||
|
||||
@@ -834,8 +834,8 @@ vim.spell.check({str}) *vim.spell.check()*
|
||||
• {str} (`string`)
|
||||
|
||||
Return: ~
|
||||
(`{[1]: string, [2]: 'bad'|'rare'|'local'|'caps', [3]: integer}[]`)
|
||||
List of tuples with three items:
|
||||
(`[string, 'bad'|'rare'|'local'|'caps', integer][]`) List of tuples
|
||||
with three items:
|
||||
• The badly spelled word.
|
||||
• The type of the spelling error: "bad" spelling mistake "rare" rare
|
||||
word "local" word only valid in another region "caps" word should
|
||||
|
||||
@@ -764,9 +764,9 @@ get_node({opts}) *vim.treesitter.get_node()*
|
||||
• {opts} (`table?`) Optional keyword arguments:
|
||||
• {bufnr} (`integer?`) Buffer number (nil or 0 for current
|
||||
buffer)
|
||||
• {pos} (`{ [1]: integer, [2]: integer }?`) 0-indexed (row,
|
||||
col) tuple. Defaults to cursor position in the current
|
||||
window. Required if {bufnr} is not the current buffer
|
||||
• {pos} (`[integer, integer]?`) 0-indexed (row, col) tuple.
|
||||
Defaults to cursor position in the current window. Required
|
||||
if {bufnr} is not the current buffer
|
||||
• {lang} (`string?`) Parser language. (default: from buffer
|
||||
filetype)
|
||||
• {ignore_injections} (`boolean?`) Ignore injected languages
|
||||
|
||||
Reference in New Issue
Block a user