aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhituzi no sippo <43565959+hituzi-no-sippo@users.noreply.github.com>2023-05-10 04:00:29 +0900
committerGitHub <noreply@github.com>2023-05-09 21:00:29 +0200
commit4e5061dba765df2a74ac4a8182f6e7fe21da125d (patch)
tree88c23655effad8a499f1fe2f41f39ef4ff9f3da0
parent36baaf7c1aa0bbc9c80f4512bb1384839c8851ff (diff)
downloadrneovim-4e5061dba765df2a74ac4a8182f6e7fe21da125d.tar.gz
rneovim-4e5061dba765df2a74ac4a8182f6e7fe21da125d.tar.bz2
rneovim-4e5061dba765df2a74ac4a8182f6e7fe21da125d.zip
docs(lsp): fix `config.cmd` argument for `vim.lsp.start_client` (#23560)
-rw-r--r--runtime/doc/lsp.txt12
-rw-r--r--runtime/lua/vim/lsp.lua4
2 files changed, 8 insertions, 8 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 96ce5b7bc0..fc365c927b 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -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()|
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index b86d41b234..a724593188 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -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`