From 592109ad9df8f36b8c4bb9f48e741123d5bf47d9 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 25 Aug 2023 11:45:10 +0200 Subject: adapt communicate API released with vis 0.9 --- README.md | 2 +- init.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 749673f..274f0f6 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Their configuration can be found in [`supported_servers.lua`](https://gitlab.com ## Requirements -* vis must be compiled with the Lua [communicate API](https://github.com/martanne/vis/pull/675). +* vis must offer the `communicate` API included in vis >= 0.9 * The language server you want to use. [Microsoft's list of implementations](https://microsoft.github.io/language-server-protocol/implementors/servers/) * Optional: the json implementation of your choice * must provide `encode` and `decode` methods diff --git a/init.lua b/init.lua index 7d82bcb..aca8425 100644 --- a/init.lua +++ b/init.lua @@ -1154,16 +1154,16 @@ local function ls_start_server(syntax) lspc.running[ls_conf.name] = ls -- register the response handler - vis.events.subscribe(vis.events.PROCESS_RESPONSE, function(name, msg, event) + vis.events.subscribe(vis.events.PROCESS_RESPONSE, function(name, event, code, msg) if name ~= ls.name then return end if event == 'EXIT' or event == 'SIGNAL' then if event == 'EXIT' then - vis:info('language server exited with: ' .. msg) + vis:info('language server exited with: ' .. code) else - vis:info('language server received signal: ' .. msg) + vis:info('language server received signal: ' .. code) end lspc.running[ls.name] = nil -- cgit v1.2.3