mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
docs(lsp): nits and typos in client.lua
This commit is contained in:
parent
191cca2566
commit
0101bdaa1a
@ -937,7 +937,7 @@ Lua module: vim.lsp.client *lsp-client*
|
|||||||
• {requests} (`table<integer,{ type: string, bufnr: integer, method: string}>`)
|
• {requests} (`table<integer,{ type: string, bufnr: integer, method: string}>`)
|
||||||
The current pending requests in flight to the
|
The current pending requests in flight to the
|
||||||
server. Entries are key-value pairs with the
|
server. Entries are key-value pairs with the
|
||||||
key being the request ID while the value is a
|
key being the request id while the value is a
|
||||||
table with `type`, `bufnr`, and `method`
|
table with `type`, `bufnr`, and `method`
|
||||||
key-value pairs. `type` is either "pending"
|
key-value pairs. `type` is either "pending"
|
||||||
for an active request, or "cancel" for a
|
for an active request, or "cancel" for a
|
||||||
@ -950,7 +950,7 @@ Lua module: vim.lsp.client *lsp-client*
|
|||||||
|vim.lsp.start_client()|. See
|
|vim.lsp.start_client()|. See
|
||||||
|vim.lsp.ClientConfig|.
|
|vim.lsp.ClientConfig|.
|
||||||
• {server_capabilities} (`lsp.ServerCapabilities?`) Response from the
|
• {server_capabilities} (`lsp.ServerCapabilities?`) Response from the
|
||||||
server sent on initialize` describing the
|
server sent on `initialize` describing the
|
||||||
server's capabilities.
|
server's capabilities.
|
||||||
• {progress} (`vim.lsp.Client.Progress`) A ring buffer
|
• {progress} (`vim.lsp.Client.Progress`) A ring buffer
|
||||||
(|vim.ringbuf()|) containing progress messages
|
(|vim.ringbuf()|) containing progress messages
|
||||||
@ -1000,9 +1000,9 @@ Lua module: vim.lsp.client *lsp-client*
|
|||||||
Sends a request to the server. This is a thin
|
Sends a request to the server. This is a thin
|
||||||
wrapper around {client.rpc.request} with some
|
wrapper around {client.rpc.request} with some
|
||||||
additional checking. If {handler} is not
|
additional checking. If {handler} is not
|
||||||
specified, If one is not found there, then an
|
specified and if there's no respective global
|
||||||
error will occur. Returns: {status},
|
handler, then an error will occur. Returns:
|
||||||
{[client_id]}. {status} is a boolean
|
{status}, {[client_id]}. {status} is a boolean
|
||||||
indicating if the notification was successful.
|
indicating if the notification was successful.
|
||||||
If it is `false`, then it will always be
|
If it is `false`, then it will always be
|
||||||
`false` (the client has shutdown). If {status}
|
`false` (the client has shutdown). If {status}
|
||||||
|
@ -156,7 +156,7 @@ local validate = vim.validate
|
|||||||
--- @field handlers table<string,lsp.Handler>
|
--- @field handlers table<string,lsp.Handler>
|
||||||
---
|
---
|
||||||
--- The current pending requests in flight to the server. Entries are key-value
|
--- The current pending requests in flight to the server. Entries are key-value
|
||||||
--- pairs with the key being the request ID while the value is a table with
|
--- pairs with the key being the request id while the value is a table with
|
||||||
--- `type`, `bufnr`, and `method` key-value pairs. `type` is either "pending"
|
--- `type`, `bufnr`, and `method` key-value pairs. `type` is either "pending"
|
||||||
--- for an active request, or "cancel" for a cancel request. It will be
|
--- for an active request, or "cancel" for a cancel request. It will be
|
||||||
--- "complete" ephemerally while executing |LspRequest| autocmds when replies
|
--- "complete" ephemerally while executing |LspRequest| autocmds when replies
|
||||||
@ -167,8 +167,8 @@ local validate = vim.validate
|
|||||||
--- to |vim.lsp.start_client()|.
|
--- to |vim.lsp.start_client()|.
|
||||||
--- @field config vim.lsp.ClientConfig
|
--- @field config vim.lsp.ClientConfig
|
||||||
---
|
---
|
||||||
--- Response from the server sent on
|
--- Response from the server sent on `initialize` describing the server's
|
||||||
--- initialize` describing the server's capabilities.
|
--- capabilities.
|
||||||
--- @field server_capabilities lsp.ServerCapabilities?
|
--- @field server_capabilities lsp.ServerCapabilities?
|
||||||
---
|
---
|
||||||
--- A ring buffer (|vim.ringbuf()|) containing progress messages
|
--- A ring buffer (|vim.ringbuf()|) containing progress messages
|
||||||
@ -217,10 +217,11 @@ local validate = vim.validate
|
|||||||
--- Sends a request to the server.
|
--- Sends a request to the server.
|
||||||
--- This is a thin wrapper around {client.rpc.request} with some additional
|
--- This is a thin wrapper around {client.rpc.request} with some additional
|
||||||
--- checking.
|
--- checking.
|
||||||
--- If {handler} is not specified, If one is not found there, then an error
|
--- If {handler} is not specified and if there's no respective global
|
||||||
--- will occur. Returns: {status}, {[client_id]}. {status} is a boolean
|
--- handler, then an error will occur.
|
||||||
--- indicating if the notification was successful. If it is `false`, then it
|
--- Returns: {status}, {[client_id]}. {status} is a boolean indicating if
|
||||||
--- will always be `false` (the client has shutdown).
|
--- the notification was successful. If it is `false`, then it will always
|
||||||
|
--- be `false` (the client has shutdown).
|
||||||
--- If {status} is `true`, the function returns {request_id} as the second
|
--- If {status} is `true`, the function returns {request_id} as the second
|
||||||
--- result. You can use this with `client.cancel_request(request_id)` to cancel
|
--- result. You can use this with `client.cancel_request(request_id)` to cancel
|
||||||
--- the request.
|
--- the request.
|
||||||
|
Loading…
Reference in New Issue
Block a user