diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-02-11 12:37:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-11 12:37:20 +0000 |
commit | ed1b66bd998b98ee8cf76b5a23c323352588dd56 (patch) | |
tree | c262796dcab8a9dd22dbf7acd611366d38d43900 /runtime/doc | |
parent | 8e86193502608c4a833f6996b942e8dd0eb8e476 (diff) | |
download | rneovim-ed1b66bd998b98ee8cf76b5a23c323352588dd56.tar.gz rneovim-ed1b66bd998b98ee8cf76b5a23c323352588dd56.tar.bz2 rneovim-ed1b66bd998b98ee8cf76b5a23c323352588dd56.zip |
refactor(lsp): move more code to client.lua
The dispatchers used by the RPC client should be defined in the client,
so they have been moved there. Due to this, it also made sense to move
all code related to client configuration and the creation of the RPC
client there too.
Now vim.lsp.start_client is significantly simplified and now mostly
contains logic for tracking open clients.
- Renamed client.new -> client.start
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lsp.txt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 9bfe21054c..fc4c164ea0 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -932,7 +932,7 @@ start({config}, {opts}) *vim.lsp.start()* `ftplugin/<filetype_name>.lua` (See |ftplugin-name|) Parameters: ~ - • {config} (`table`) Same configuration as documented in + • {config} (`lsp.ClientConfig`) Same configuration as documented in |vim.lsp.start_client()| • {opts} (`lsp.StartOpts?`) Optional keyword arguments: • reuse_client (fun(client: client, config: table): boolean) @@ -2173,17 +2173,14 @@ rpc_response_error({code}, {message}, {data}) See also: ~ • lsp.ErrorCodes See `vim.lsp.protocol.ErrorCodes` - *vim.lsp.rpc.start()* -start({cmd}, {cmd_args}, {dispatchers}, {extra_spawn_params}) +start({cmd}, {dispatchers}, {extra_spawn_params}) *vim.lsp.rpc.start()* Starts an LSP server process and create an LSP RPC client object to interact with it. Communication with the spawned process happens via stdio. For communication via TCP, spawn a process manually and use |vim.lsp.rpc.connect()| Parameters: ~ - • {cmd} (`string`) Command to start the LSP server. - • {cmd_args} (`string[]`) List of additional string arguments - to pass to {cmd}. + • {cmd} (`string[]`) Command to start the LSP server. • {dispatchers} (`vim.lsp.rpc.Dispatchers?`) Dispatchers for LSP message types. Valid dispatcher names are: • `"notification"` |