From 6cbe58391cb03fc5d2874aedbcb5acc4b42092c7 Mon Sep 17 00:00:00 2001 From: Mark Sujew Date: Tue, 6 Jun 2023 12:34:03 +0200 Subject: [PATCH] Update readme --- packages/langium-railroad/README.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/langium-railroad/README.md b/packages/langium-railroad/README.md index 11e8c42c7..275583583 100644 --- a/packages/langium-railroad/README.md +++ b/packages/langium-railroad/README.md @@ -1,16 +1,5 @@ -# Integration of Langium and Sprotty +# Langium Railroad Diagrams -This package provides glue code for [Langium](https://langium.org) and [Sprotty](https://www.npmjs.com/package/sprotty). It includes the following features: +This package provides the ability to build railroad syntax diagrams for [Langium](https://langium.org) grammars. - * Generate diagram models from a Langium AST - * Listen to document changes and update existing diagram models automatically - * Hook into the JSON-RPC channel used by the language server - -The counterpart of this integration is the [sprotty-vscode](https://www.npmjs.com/package/sprotty-vscode) package, which provides Sprotty diagrams embedded in VS Code webviews and is able to connect with the JSON-RPC stream of a chosen language. - -## How to Use This - - 1. Implement a diagram model generator by extending `LangiumDiagramGenerator` - 2. Add `SprottyDiagramServices` to the dependency injection module of your language and bind the `diagram.DiagramGenerator` service - 3. Add `DefaultSprottyModule` to the `inject` function that sets up your dependency injection container - 4. Call the `addDiagramHandler` function in your main code to hook into the JSON-RPC stream +It is reused by the [langium-cli](https://www.npmjs.com/package/langium-cli) package and the [Langium VSCode extension](https://marketplace.visualstudio.com/items?itemName=langium.langium-vscode).