diff options
author | Tristan Knight <admin@snappeh.com> | 2024-09-03 16:10:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 08:10:39 -0700 |
commit | 45e76acaa053a077cab49b6606536d3f2646f033 (patch) | |
tree | 41f6c72705df360f795777bb68b6a36e75643ab0 /runtime/doc | |
parent | fdd3a9cdf7167ca8fc84ec9a7e583f6410a27188 (diff) | |
download | rneovim-45e76acaa053a077cab49b6606536d3f2646f033.tar.gz rneovim-45e76acaa053a077cab49b6606536d3f2646f033.tar.bz2 rneovim-45e76acaa053a077cab49b6606536d3f2646f033.zip |
feat(lsp): support hostname in rpc.connect #30238
Updated the `rpc.connect` function to support connecting to LSP servers
using hostnames, not just IP addresses. This change includes updates to
the documentation and additional test cases to verify the new
functionality.
- Modified `connect` function to resolve hostnames.
- Updated documentation to reflect the change.
- Added test case for connecting using hostname.
Added a TCP echo server utility function to the LSP test suite. This
server echoes the first message it receives and is used in tests to
verify LSP server connections via both IP address and hostname.
Refactored existing tests to use the new utility function.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lsp.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index a8b5825e63..e820d54a9e 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -2311,14 +2311,14 @@ connect({host_or_path}, {port}) *vim.lsp.rpc.connect()* Create a LSP RPC client factory that connects to either: • a named pipe (windows) • a domain socket (unix) - • a host and port via TCP (host must be IP address) + • a host and port via TCP Return a function that can be passed to the `cmd` field for |vim.lsp.start_client()| or |vim.lsp.start()|. Parameters: ~ - • {host_or_path} (`string`) host (IP address) to connect to or path to - a pipe/domain socket + • {host_or_path} (`string`) host to connect to or path to a pipe/domain + socket • {port} (`integer?`) TCP port to connect to. If absent the first argument must be a pipe |