refactor(lsp): merge rpc.domain_socket_connect into rpc.connect (#28398)

See discussion in https://github.com/neovim/neovim/pull/26850
This commit is contained in:
Mathias Fußenegger
2024-04-18 15:34:10 +02:00
committed by GitHub
parent 206475d791
commit 97323d821b
4 changed files with 41 additions and 90 deletions

View File

@@ -4311,7 +4311,7 @@ describe('LSP', function()
]]
eq('initialize', result.method)
end)
it('can connect to lsp server via rpc.domain_socket_connect', function()
it('can connect to lsp server via pipe or domain_socket', function()
local tmpfile --- @type string
if is_os('win') then
tmpfile = '\\\\.\\\\pipe\\pipe.test'
@@ -4336,7 +4336,7 @@ describe('LSP', function()
client:close()
end))
end)
vim.lsp.start({ name = "dummy", cmd = vim.lsp.rpc.domain_socket_connect(SOCK) })
vim.lsp.start({ name = "dummy", cmd = vim.lsp.rpc.connect(SOCK) })
vim.wait(1000, function() return init ~= nil end)
assert(init, "server must receive `initialize` request")
server:close()