mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 15:14:04 +00:00
Bugfixes.
- Return after an error in RPC. - Use an empty vim table for serialization.
This commit is contained in:
@@ -400,7 +400,7 @@ function lsp.start_client(config)
|
||||
rpc.request('initialize', initialize_params, function(init_err, result)
|
||||
assert(not init_err, tostring(init_err))
|
||||
assert(result, "server sent empty result")
|
||||
rpc.notify('initialized', {})
|
||||
rpc.notify('initialized', {[vim.type_idx]=vim.types.dictionary})
|
||||
client.initialized = true
|
||||
uninitialized_clients[client_id] = nil
|
||||
client.server_capabilities = assert(result.capabilities, "initialize result doesn't contain capabilities")
|
||||
|
||||
@@ -340,6 +340,7 @@ local function create_and_start_client(cmd, cmd_args, handlers, extra_spawn_para
|
||||
local decoded, err = json_decode(body)
|
||||
if not decoded then
|
||||
on_error(client_errors.INVALID_SERVER_JSON, err)
|
||||
return
|
||||
end
|
||||
local _ = log.debug() and log.debug("decoded", decoded)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user