aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-08-25 11:45:10 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-08-29 18:47:35 +0200
commit592109ad9df8f36b8c4bb9f48e741123d5bf47d9 (patch)
tree8490761dc70edd259c854c9b14e46aede7f72b03
parent2751145b885aea02aabbc193af359da9cb9127e6 (diff)
downloadvis-lspc-592109ad9df8f36b8c4bb9f48e741123d5bf47d9.tar.gz
vis-lspc-592109ad9df8f36b8c4bb9f48e741123d5bf47d9.zip
adapt communicate API released with vis 0.9
-rw-r--r--README.md2
-rw-r--r--init.lua6
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