diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-04-30 22:32:02 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-04-30 22:32:02 +0200 |
| commit | 05feb47b380d38d20af824ede7b43d0e2d1f9ecb (patch) | |
| tree | 0ea013d13d90b28455c8c940f89f4bb68bd78c76 /README.md | |
| parent | e505535d40d44a0bda341b37a5611663ef9815fe (diff) | |
| download | vis-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.md | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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` |
