diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2024-04-18 15:34:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 15:34:10 +0200 |
commit | 97323d821be97deeb1a5797b4ca534156b9e9b0c (patch) | |
tree | 363af04083159214a9b7d1fd01e0a3d060f6e5b6 /runtime/doc | |
parent | 206475d7919ccdefd32022a32b204c8941b48fa6 (diff) | |
download | rneovim-97323d821be97deeb1a5797b4ca534156b9e9b0c.tar.gz rneovim-97323d821be97deeb1a5797b4ca534156b9e9b0c.tar.bz2 rneovim-97323d821be97deeb1a5797b4ca534156b9e9b0c.zip |
refactor(lsp): merge rpc.domain_socket_connect into rpc.connect (#28398)
See discussion in https://github.com/neovim/neovim/pull/26850
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lsp.txt | 30 | ||||
-rw-r--r-- | runtime/doc/news.txt | 2 |
2 files changed, 10 insertions, 22 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 70b8878837..0ca5240da0 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -2229,32 +2229,20 @@ Lua module: vim.lsp.rpc *lsp-rpc* • {terminate} (`fun()`) -connect({host}, {port}) *vim.lsp.rpc.connect()* - Create a LSP RPC client factory that connects via TCP to the given host - and port. +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 Return a function that can be passed to the `cmd` field for |vim.lsp.start_client()| or |vim.lsp.start()|. Parameters: ~ - • {host} (`string`) host to connect to - • {port} (`integer`) port to connect to - - Return: ~ - (`fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient`) - - *vim.lsp.rpc.domain_socket_connect()* -domain_socket_connect({pipe_path}) - Create a LSP RPC client factory that connects via named pipes (Windows) or - unix domain sockets (Unix) to the given pipe_path (file path on Unix and - name on Windows). - - Return a function that can be passed to the `cmd` field for - |vim.lsp.start_client()| or |vim.lsp.start()|. - - Parameters: ~ - • {pipe_path} (`string`) file path of the domain socket (Unix) or name - of the named pipe (Windows) to connect to + • {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 Return: ~ (`fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient`) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 966d50c382..8d51d9d849 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -225,7 +225,7 @@ The following new APIs and features were added. • |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to the original LSP `Location` or `LocationLink`. • Added support for connecting to servers using named pipes (Windows) or - unix domain sockets (Unix) via |vim.lsp.rpc.domain_socket_connect()|. + unix domain sockets (Unix) via |vim.lsp.rpc.connect()|. • Added support for `completionList.itemDefaults`, reducing overhead when computing completion items where properties often share the same value (e.g. `commitCharacters`). Note that this might affect plugins and |