mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
docs(lsp): fix description of only
in vim.lsp.buf.code_action() (#18492)
This commit is contained in:
@@ -985,10 +985,10 @@ code_action({options}) *vim.lsp.buf.code_action()*
|
|||||||
• context (table|nil): Corresponds to `CodeActionContext` of the LSP specification:
|
• context (table|nil): Corresponds to `CodeActionContext` of the LSP specification:
|
||||||
• diagnostics (table|nil): LSP`Diagnostic[]` . Inferred from the current position if not
|
• diagnostics (table|nil): LSP`Diagnostic[]` . Inferred from the current position if not
|
||||||
provided.
|
provided.
|
||||||
• only (string|nil): LSP `CodeActionKind`
|
• only (table|nil): List of LSP
|
||||||
used to filter the code actions. Most
|
`CodeActionKind`s used to filter the code
|
||||||
language servers support values like
|
actions. Most language servers support
|
||||||
`refactor` or `quickfix`.
|
values like `refactor` or `quickfix`.
|
||||||
|
|
||||||
• filter (function|nil): Predicate function
|
• filter (function|nil): Predicate function
|
||||||
taking an `CodeAction` and returning a
|
taking an `CodeAction` and returning a
|
||||||
@@ -1183,10 +1183,10 @@ range_code_action({context}, {start_pos}, {end_pos})
|
|||||||
{context} table|nil `CodeActionContext` of the LSP specification:
|
{context} table|nil `CodeActionContext` of the LSP specification:
|
||||||
• diagnostics: (table|nil) LSP`Diagnostic[]` . Inferred from the current position if not
|
• diagnostics: (table|nil) LSP`Diagnostic[]` . Inferred from the current position if not
|
||||||
provided.
|
provided.
|
||||||
• only: (string|nil) LSP `CodeActionKind`
|
• only: (table|nil) List of LSP
|
||||||
used to filter the code actions. Most
|
`CodeActionKind`s used to filter the code
|
||||||
language servers support values like
|
actions. Most language servers support
|
||||||
`refactor` or `quickfix`.
|
values like `refactor` or `quickfix`.
|
||||||
{start_pos} ({number, number}, optional) mark-indexed
|
{start_pos} ({number, number}, optional) mark-indexed
|
||||||
position. Defaults to the start of the last
|
position. Defaults to the start of the last
|
||||||
visual selection.
|
visual selection.
|
||||||
|
@@ -783,8 +783,8 @@ end
|
|||||||
--- - diagnostics (table|nil):
|
--- - diagnostics (table|nil):
|
||||||
--- LSP `Diagnostic[]`. Inferred from the current
|
--- LSP `Diagnostic[]`. Inferred from the current
|
||||||
--- position if not provided.
|
--- position if not provided.
|
||||||
--- - only (string|nil):
|
--- - only (table|nil):
|
||||||
--- LSP `CodeActionKind` used to filter the code actions.
|
--- List of LSP `CodeActionKind`s used to filter the code actions.
|
||||||
--- Most language servers support values like `refactor`
|
--- Most language servers support values like `refactor`
|
||||||
--- or `quickfix`.
|
--- or `quickfix`.
|
||||||
--- - filter (function|nil):
|
--- - filter (function|nil):
|
||||||
@@ -817,8 +817,8 @@ end
|
|||||||
--- - diagnostics: (table|nil)
|
--- - diagnostics: (table|nil)
|
||||||
--- LSP `Diagnostic[]`. Inferred from the current
|
--- LSP `Diagnostic[]`. Inferred from the current
|
||||||
--- position if not provided.
|
--- position if not provided.
|
||||||
--- - only: (string|nil)
|
--- - only: (table|nil)
|
||||||
--- LSP `CodeActionKind` used to filter the code actions.
|
--- List of LSP `CodeActionKind`s used to filter the code actions.
|
||||||
--- Most language servers support values like `refactor`
|
--- Most language servers support values like `refactor`
|
||||||
--- or `quickfix`.
|
--- or `quickfix`.
|
||||||
---@param start_pos ({number, number}, optional) mark-indexed position.
|
---@param start_pos ({number, number}, optional) mark-indexed position.
|
||||||
|
Reference in New Issue
Block a user