commit 7ce261c064e921467e200f20318b9efbacc75eba
parent a46991e1c6ff769d2381d87886ac4f7397ab25c3
Author: Yi Ming <ofseed@foxmail.com>
Date: Tue, 18 Jun 2024 07:04:40 +0800
docs(lsp): format the handwritten part #29295
Diffstat:
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
@@ -220,26 +220,26 @@ Each response handler has this signature: >
function(err, result, ctx, config)
<
Parameters: ~
- - {err} (table|nil) Error info dict, or `nil` if the request
- completed.
- - {result} (Result | Params | nil) `result` key of the |lsp-response| or
- `nil` if the request failed.
- - {ctx} (table) Table of calling state associated with the
- handler, with these keys:
- - {method} (string) |lsp-method| name.
- - {client_id} (number) |vim.lsp.Client| identifier.
- - {bufnr} (Buffer) Buffer handle.
- - {params} (table|nil) Request parameters table.
- - {version} (number) Document version at time of
- request. Handlers can compare this to the
- current document version to check if the
- response is "stale". See also |b:changedtick|.
- - {config} (table) Handler-defined configuration table, which allows
- users to customize handler behavior.
- For an example, see:
- |vim.lsp.diagnostic.on_publish_diagnostics()|
- To configure a particular |lsp-handler|, see:
- |lsp-handler-configuration|
+ • {err} (`table|nil`) Error info dict, or `nil` if the request
+ completed.
+ • {result} (`Result|Params|nil`) `result` key of the |lsp-response| or
+ `nil` if the request failed.
+ • {ctx} (`table`) Table of calling state associated with the
+ handler, with these keys:
+ • {method} (`string`) |lsp-method| name.
+ • {client_id} (`number`) |vim.lsp.Client| identifier.
+ • {bufnr} (`Buffer`) Buffer handle.
+ • {params} (`table|nil`) Request parameters table.
+ • {version} (`number`) Document version at time of
+ request. Handlers can compare this to the
+ current document version to check if the
+ response is "stale". See also |b:changedtick|.
+ • {config} (`table`) Handler-defined configuration table, which allows
+ users to customize handler behavior.
+ For an example, see:
+ |vim.lsp.diagnostic.on_publish_diagnostics()|
+ To configure a particular |lsp-handler|, see:
+ |lsp-handler-configuration|
Returns: ~
Two values `result, err` where `err` is shaped like an RPC error: >