mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 17:12:40 +00:00
docs: vim.lsp.rpc.connect() TCP requires IP address #30219
"localhost" would work if we used [tcp_connect](ae0387742b/examples/echo-server-client.lua (L42)), but that will require changes to [vim.lsp.rpc.connect](318c0415d5/runtime/lua/vim/lsp/rpc.lua (L638)).
This commit is contained in:
@@ -2311,14 +2311,14 @@ connect({host_or_path}, {port}) *vim.lsp.rpc.connect()*
|
|||||||
Create a LSP RPC client factory that connects to either:
|
Create a LSP RPC client factory that connects to either:
|
||||||
• a named pipe (windows)
|
• a named pipe (windows)
|
||||||
• a domain socket (unix)
|
• a domain socket (unix)
|
||||||
• a host and port via TCP
|
• a host and port via TCP (host must be IP address)
|
||||||
|
|
||||||
Return a function that can be passed to the `cmd` field for
|
Return a function that can be passed to the `cmd` field for
|
||||||
|vim.lsp.start_client()| or |vim.lsp.start()|.
|
|vim.lsp.start_client()| or |vim.lsp.start()|.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
• {host_or_path} (`string`) host to connect to or path to a pipe/domain
|
• {host_or_path} (`string`) host (IP address) to connect to or path to
|
||||||
socket
|
a pipe/domain socket
|
||||||
• {port} (`integer?`) TCP port to connect to. If absent the
|
• {port} (`integer?`) TCP port to connect to. If absent the
|
||||||
first argument must be a pipe
|
first argument must be a pipe
|
||||||
|
|
||||||
|
|||||||
@@ -627,12 +627,12 @@ end
|
|||||||
---
|
---
|
||||||
--- - a named pipe (windows)
|
--- - a named pipe (windows)
|
||||||
--- - a domain socket (unix)
|
--- - a domain socket (unix)
|
||||||
--- - a host and port via TCP
|
--- - a host and port via TCP (host must be IP address)
|
||||||
---
|
---
|
||||||
--- Return a function that can be passed to the `cmd` field for
|
--- Return a function that can be passed to the `cmd` field for
|
||||||
--- |vim.lsp.start_client()| or |vim.lsp.start()|.
|
--- |vim.lsp.start_client()| or |vim.lsp.start()|.
|
||||||
---
|
---
|
||||||
---@param host_or_path string host to connect to or path to a pipe/domain socket
|
---@param host_or_path string host (IP address) to connect to or path to a pipe/domain socket
|
||||||
---@param port integer? TCP port to connect to. If absent the first argument must be a pipe
|
---@param port integer? TCP port to connect to. If absent the first argument must be a pipe
|
||||||
---@return fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient
|
---@return fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient
|
||||||
function M.connect(host_or_path, port)
|
function M.connect(host_or_path, port)
|
||||||
|
|||||||
Reference in New Issue
Block a user