mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 07:02:46 +00:00
docs(diagnostics): fix typos
This commit is contained in:
@@ -254,7 +254,7 @@ get({bufnr}, {opts}) *vim.diagnostic.get()*
|
|||||||
Get current diagnostics.
|
Get current diagnostics.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{bufnr} number|nil Buffer number to get diagnistics from.
|
{bufnr} number|nil Buffer number to get diagnostics from.
|
||||||
Use 0 for current buffer or nil for all buffers.
|
Use 0 for current buffer or nil for all buffers.
|
||||||
{opts} table|nil A table with the following keys:
|
{opts} table|nil A table with the following keys:
|
||||||
• namespace: (number) Limit diagnostics to the
|
• namespace: (number) Limit diagnostics to the
|
||||||
@@ -320,7 +320,7 @@ get_virt_text_chunks({line_diags}, {opts})
|
|||||||
insert before virtual text.
|
insert before virtual text.
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
an array of [text, hl_group] arrays. This can be passed
|
array of ({text}, {hl_group}) tuples. This can be passed
|
||||||
directly to the {virt_text} option of
|
directly to the {virt_text} option of
|
||||||
|nvim_buf_set_extmark()|.
|
|nvim_buf_set_extmark()|.
|
||||||
|
|
||||||
@@ -456,7 +456,7 @@ show_line_diagnostics({opts}, {bufnr}, {lnum})
|
|||||||
of cursor.
|
of cursor.
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
A ({popup_bufnr}, {win_id}) tuple
|
tuple ({popup_bufnr}, {win_id})
|
||||||
|
|
||||||
*vim.diagnostic.show_position_diagnostics()*
|
*vim.diagnostic.show_position_diagnostics()*
|
||||||
show_position_diagnostics({opts}, {bufnr}, {position})
|
show_position_diagnostics({opts}, {bufnr}, {position})
|
||||||
@@ -465,7 +465,7 @@ show_position_diagnostics({opts}, {bufnr}, {position})
|
|||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{opts} table|nil Configuration table with the same
|
{opts} table|nil Configuration table with the same
|
||||||
keys as |vim.lsp.util.open_floatin_preview()|
|
keys as |vim.lsp.util.open_floating_preview()|
|
||||||
in addition to the following:
|
in addition to the following:
|
||||||
• namespace: (number) Limit diagnostics to the
|
• namespace: (number) Limit diagnostics to the
|
||||||
given namespace
|
given namespace
|
||||||
@@ -478,6 +478,6 @@ show_position_diagnostics({opts}, {bufnr}, {position})
|
|||||||
to the current cursor position.
|
to the current cursor position.
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
A ({popup_bufnr}, {win_id}) tuple
|
tuple ({popup_bufnr}, {win_id})
|
||||||
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ end
|
|||||||
---@param opts table|nil Configuration table with the following keys:
|
---@param opts table|nil Configuration table with the following keys:
|
||||||
--- - prefix: (string) Prefix to display before virtual text on line.
|
--- - prefix: (string) Prefix to display before virtual text on line.
|
||||||
--- - spacing: (number) Number of spaces to insert before virtual text.
|
--- - spacing: (number) Number of spaces to insert before virtual text.
|
||||||
---@return an array of [text, hl_group] arrays. This can be passed directly to
|
---@return array of ({text}, {hl_group}) tuples. This can be passed directly to
|
||||||
--- the {virt_text} option of |nvim_buf_set_extmark()|.
|
--- the {virt_text} option of |nvim_buf_set_extmark()|.
|
||||||
function M.get_virt_text_chunks(line_diags, opts)
|
function M.get_virt_text_chunks(line_diags, opts)
|
||||||
if #line_diags == 0 then
|
if #line_diags == 0 then
|
||||||
@@ -1013,7 +1013,7 @@ end
|
|||||||
--- - show_header: (boolean, default true) Show "Diagnostics:" header
|
--- - show_header: (boolean, default true) Show "Diagnostics:" header
|
||||||
---@param bufnr number|nil Buffer number. Defaults to the current buffer.
|
---@param bufnr number|nil Buffer number. Defaults to the current buffer.
|
||||||
---@param position table|nil The (0,0)-indexed position. Defaults to the current cursor position.
|
---@param position table|nil The (0,0)-indexed position. Defaults to the current cursor position.
|
||||||
---@return A ({popup_bufnr}, {win_id}) tuple
|
---@return tuple ({popup_bufnr}, {win_id})
|
||||||
function M.show_position_diagnostics(opts, bufnr, position)
|
function M.show_position_diagnostics(opts, bufnr, position)
|
||||||
vim.validate {
|
vim.validate {
|
||||||
opts = { opts, 't', true },
|
opts = { opts, 't', true },
|
||||||
@@ -1045,7 +1045,7 @@ end
|
|||||||
---@param opts table Configuration table. See |vim.diagnostic.show_position_diagnostics()|.
|
---@param opts table Configuration table. See |vim.diagnostic.show_position_diagnostics()|.
|
||||||
---@param bufnr number|nil Buffer number. Defaults to the current buffer.
|
---@param bufnr number|nil Buffer number. Defaults to the current buffer.
|
||||||
---@param lnum number|nil Line number. Defaults to line number of cursor.
|
---@param lnum number|nil Line number. Defaults to line number of cursor.
|
||||||
---@return A ({popup_bufnr}, {win_id}) tuple
|
---@return tuple ({popup_bufnr}, {win_id})
|
||||||
function M.show_line_diagnostics(opts, bufnr, lnum)
|
function M.show_line_diagnostics(opts, bufnr, lnum)
|
||||||
vim.validate {
|
vim.validate {
|
||||||
opts = { opts, 't', true },
|
opts = { opts, 't', true },
|
||||||
|
|||||||
Reference in New Issue
Block a user