aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-04-30 22:32:02 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-04-30 22:32:02 +0200
commit05feb47b380d38d20af824ede7b43d0e2d1f9ecb (patch)
tree0ea013d13d90b28455c8c940f89f4bb68bd78c76 /README.md
parente505535d40d44a0bda341b37a5611663ef9815fe (diff)
downloadvis-lspc-05feb47b380d38d20af824ede7b43d0e2d1f9ecb.tar.gz
vis-lspc-05feb47b380d38d20af824ede7b43d0e2d1f9ecb.zip
use vis' event system instead of custom language server hooks
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index 994eb13..0f43711 100644
--- a/README.md
+++ b/README.md
@@ -161,8 +161,6 @@ Additional fields are:
* `settings` - a table of arbitrary possibly nested data. It is sent in a `workspace/didChangeConfiguration` to the language server after initialization. It is also used to lookup configuration for the `workspace/configuratio` method call.
* `init_options` - table of arbitrary possibly nested data. It will be sent to the server as `initializationOptions` in the parameters of the `initialize` method call.
* `formatting_options` - table of configuration data as found in [the LSP specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_formatting). `tabSize` and `insertSpaces` are required.
-* `initialized_hook` - function called after sending the `initialized` notification. The first parameter is the language server.
-* `file_open_hook` - function called after sending the `textDocument/didOpen` notification. The first parameter is the language server.
**Example:** The language server configuration entry in the `ls_map` for `lua-language-server`
@@ -179,6 +177,15 @@ ls_map.lua = {
Language servers configured in `vis-lspc` can be found in `supported_servers.lua`.
+### Events
+
+vis-lspc extends vis' event system with its own set of events:
+
+* `lspc.event.LS_INITIALIZED` - emitted after sending the `initialized` notification
+* `lspc.event.LS_DID_OPEN` - emitted after sending the `textDocument/didOpen` notification
+
+All events receive the language server as first argument.
+
### Extensibility
The returned module table also includes functions you can use in your own `vis`