diff options
author | Mathias Fussenegger <f.mathias@zignar.net> | 2022-08-24 20:25:34 +0200 |
---|---|---|
committer | Mathias Fussenegger <f.mathias@zignar.net> | 2022-08-28 14:07:53 +0200 |
commit | 60ec6e34d585a7f633d49aab790066c1740885e1 (patch) | |
tree | 94527df960d8c891c767a5141477f32107a98db6 /runtime/doc | |
parent | 46bb34e26b3bee89fd1d5d9d1bebced00000732d (diff) | |
download | rneovim-60ec6e34d585a7f633d49aab790066c1740885e1.tar.gz rneovim-60ec6e34d585a7f633d49aab790066c1740885e1.tar.bz2 rneovim-60ec6e34d585a7f633d49aab790066c1740885e1.zip |
feat(lsp): add tcp support
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lsp.txt | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 9661a43e4c..82d94afdc8 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -825,7 +825,7 @@ start({config}, {opts}) *vim.lsp.start()* re-uses a client if name and root_dir matches. Return: ~ - (number) client_id + (number|nil) client_id start_client({config}) *vim.lsp.start_client()* Starts and initializes a client with the given configuration. @@ -835,9 +835,16 @@ start_client({config}) *vim.lsp.start_client()* The following parameters describe fields in the {config} table. Parameters: ~ - {cmd} (required, string or list treated like - |jobstart()|) Base command that initiates the LSP - client. + {cmd} (table|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 `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| {cmd_cwd} (string, default=|getcwd()|) Directory to launch the `cmd` process. Not related to `root_dir`. {cmd_env} (table) Environment flags to pass to the LSP on @@ -1890,6 +1897,17 @@ should_log({level}) *vim.lsp.log.should_log()* ============================================================================== Lua module: vim.lsp.rpc *lsp-rpc* +connect({host}, {port}) *vim.lsp.rpc.connect()* + Create a LSP RPC client factory that connects via TCP to the given host + and port + + Parameters: ~ + {host} (string) + {port} (number) + + Return: ~ + (function) + format_rpc_error({err}) *vim.lsp.rpc.format_rpc_error()* Constructs an error message from an LSP error object. |