mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
chore: fix typos (#16361)
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com> Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
This commit is contained in:
@@ -579,26 +579,7 @@ end
|
||||
--- * priority: (number, default 10) Base priority to use for signs. When
|
||||
--- {severity_sort} is used, the priority of a sign is adjusted based on
|
||||
--- its severity. Otherwise, all signs use the same priority.
|
||||
--- - float: Options for floating windows:
|
||||
--- * severity: See |diagnostic-severity|.
|
||||
--- * header: (string or table) String to use as the header for the floating
|
||||
--- window. If a table, it is interpreted as a [text, hl_group] tuple.
|
||||
--- Defaults to "Diagnostics:".
|
||||
--- * source: (string) Include the diagnostic source in
|
||||
--- the message. One of "always" or "if_many".
|
||||
--- * format: (function) A function that takes a diagnostic as input and returns a
|
||||
--- string. The return value is the text used to display the diagnostic.
|
||||
--- * prefix: (function, string, or table) Prefix each diagnostic in the floating
|
||||
--- window. If a function, it must have the signature (diagnostic, i,
|
||||
--- total) -> (string, string), where {i} is the index of the diagnostic
|
||||
--- being evaluated and {total} is the total number of diagnostics
|
||||
--- displayed in the window. The function should return a string which
|
||||
--- is prepended to each diagnostic in the window as well as an
|
||||
--- (optional) highlight group which will be used to highlight the
|
||||
--- prefix. If {prefix} is a table, it is interpreted as a [text,
|
||||
--- hl_group] tuple as in |nvim_echo()|; otherwise, if {prefix} is a
|
||||
--- string, it is prepended to each diagnostic in the window with no
|
||||
--- highlight.
|
||||
--- - float: Options for floating windows. See |vim.diagnostic.open_float()|.
|
||||
--- - update_in_insert: (default false) Update diagnostics in Insert mode (if false,
|
||||
--- diagnostics are updated on InsertLeave)
|
||||
--- - severity_sort: (default false) Sort diagnostics by severity. This affects the order in
|
||||
@@ -606,6 +587,7 @@ end
|
||||
--- are displayed before lower severities (e.g. ERROR is displayed before WARN).
|
||||
--- Options:
|
||||
--- * reverse: (boolean) Reverse sort order
|
||||
---
|
||||
---@param namespace number|nil Update the options for the given namespace. When omitted, update the
|
||||
--- global diagnostic options.
|
||||
function M.config(opts, namespace)
|
||||
@@ -800,7 +782,9 @@ end
|
||||
--- - severity: See |diagnostic-severity|.
|
||||
--- - float: (boolean or table, default true) If "true", call |vim.diagnostic.open_float()|
|
||||
--- after moving. If a table, pass the table as the {opts} parameter to
|
||||
--- |vim.diagnostic.open_float()|.
|
||||
--- |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
|
||||
function M.goto_next(opts)
|
||||
return diagnostic_move_pos(
|
||||
@@ -1164,7 +1148,17 @@ end
|
||||
--- - format: (function) A function that takes a diagnostic as input and returns a
|
||||
--- string. The return value is the text used to display the diagnostic.
|
||||
--- Overrides the setting from |vim.diagnostic.config()|.
|
||||
--- - prefix: (function, string, or table) Prefix each diagnostic in the floating window.
|
||||
--- - prefix: (function, string, or table) Prefix each diagnostic in the floating
|
||||
--- window. If a function, it must have the signature (diagnostic, i,
|
||||
--- total) -> (string, string), where {i} is the index of the diagnostic
|
||||
--- being evaluated and {total} is the total number of diagnostics
|
||||
--- displayed in the window. The function should return a string which
|
||||
--- is prepended to each diagnostic in the window as well as an
|
||||
--- (optional) highlight group which will be used to highlight the
|
||||
--- prefix. If {prefix} is a table, it is interpreted as a [text,
|
||||
--- hl_group] tuple as in |nvim_echo()|; otherwise, if {prefix} is a
|
||||
--- string, it is prepended to each diagnostic in the window with no
|
||||
--- highlight.
|
||||
--- Overrides the setting from |vim.diagnostic.config()|.
|
||||
---@return tuple ({float_bufnr}, {win_id})
|
||||
function M.open_float(bufnr, opts)
|
||||
|
||||
Reference in New Issue
Block a user