Add host-configurable LSP server
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user