docs(lsp): fix config.cmd argument for vim.lsp.start_client (#23560)

This commit is contained in:
hituzi no sippo 2023-05-10 04:00:29 +09:00 committed by GitHub
parent 36baaf7c1a
commit 4e5061dba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -942,12 +942,12 @@ start_client({config}) *vim.lsp.start_client()*
Parameters: ~
• {config} (table) Configuration for the server:
• cmd: (string[]|fun(dispatchers: table):table) command
string or list treated like |jobstart()|. The command must
launch the language server process. `cmd` can also be a
function that creates an RPC client. The function receives
a dispatchers table and must return a table with the
functions `request`, `notify`, `is_closing` and
• cmd: (string[]|fun(dispatchers: table):table) command a
list of strings treated like |jobstart()|. The command
must launch the language server process. `cmd` can also be
a function that creates an RPC client. The function
receives a dispatchers table and must return a table with
the functions `request`, `notify`, `is_closing` and
`terminate` See |vim.lsp.rpc.request()| and
|vim.lsp.rpc.notify()| For TCP there is a built-in rpc
client factory: |vim.lsp.rpc.connect()|

View File

@ -901,8 +901,8 @@ end
--- Field `cmd` in {config} is required.
---
---@param config (table) Configuration for the server:
--- - cmd: (string[]|fun(dispatchers: table):table) command string or
--- list treated like |jobstart()|. The command must launch the language server
--- - cmd: (string[]|fun(dispatchers: table):table) command a list of
--- strings treated like |jobstart()|. The command must launch the language server
--- process. `cmd` can also be a function that creates an RPC client.
--- The function receives a dispatchers table and must return a table with the
--- functions `request`, `notify`, `is_closing` and `terminate`