Add host-configurable LSP server

This commit is contained in:
2026-08-12 05:42:45 +09:00
parent bdaccd9803
commit 610358110f
11 changed files with 996 additions and 6 deletions
+13
View File
@@ -65,6 +65,19 @@ Enable optional regex support when needed:
cargo run -q -p decodal-cli --features regex -- examples/regex/main.dcdl
```
## Language server
The `decodal-lsp` workspace package provides a stdio language server with live semantic diagnostics and document formatting.
Its library API accepts the same host environment used for production evaluation, so application-defined globals and structured import routing remain available in the editor.
Run the default filesystem-backed server from the repository:
```sh
cargo run -q -p decodal-lsp
```
Embedded applications can implement `decodal_lsp::LspEnvironment` for their existing `HostEnvironment` and construct it from the `InitializeParams` passed to `decodal_lsp::run_stdio`.
## Web playground
The static documentation site and browser playground live under: