aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-02-11 12:37:20 +0000
committerGitHub <noreply@github.com>2024-02-11 12:37:20 +0000
commited1b66bd998b98ee8cf76b5a23c323352588dd56 (patch)
treec262796dcab8a9dd22dbf7acd611366d38d43900 /test/functional/plugin/lsp_spec.lua
parent8e86193502608c4a833f6996b942e8dd0eb8e476 (diff)
downloadrneovim-ed1b66bd998b98ee8cf76b5a23c323352588dd56.tar.gz
rneovim-ed1b66bd998b98ee8cf76b5a23c323352588dd56.tar.bz2
rneovim-ed1b66bd998b98ee8cf76b5a23c323352588dd56.zip
refactor(lsp): move more code to client.lua
The dispatchers used by the RPC client should be defined in the client, so they have been moved there. Due to this, it also made sense to move all code related to client configuration and the creation of the RPC client there too. Now vim.lsp.start_client is significantly simplified and now mostly contains logic for tracking open clients. - Renamed client.new -> client.start
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-rw-r--r--test/functional/plugin/lsp_spec.lua24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index ce76861b9a..fb153b83ca 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -139,30 +139,6 @@ describe('LSP', function()
end)
end)
end)
-
- describe('lsp._cmd_parts test', function()
- local function _cmd_parts(input)
- return exec_lua(
- [[
- lsp = require('vim.lsp')
- return lsp._cmd_parts(...)
- ]],
- input
- )
- end
- it('should valid cmd argument', function()
- eq(true, pcall(_cmd_parts, { 'nvim' }))
- eq(true, pcall(_cmd_parts, { 'nvim', '--head' }))
- end)
-
- it('should invalid cmd argument', function()
- eq('.../lsp.lua:0: cmd: expected list, got nvim', pcall_err(_cmd_parts, 'nvim'))
- eq(
- '.../lsp.lua:0: cmd argument: expected string, got number',
- pcall_err(_cmd_parts, { 'nvim', 1 })
- )
- end)
- end)
end)
describe('LSP', function()