Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

langium-sprotty

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langium-sprotty

Use Langium as source for Sprotty diagram models

latest
Source
npmnpm
Version
4.1.0
Version published
Maintainers
3
Created
Source

Integration of Langium and Sprotty

This package provides glue code for Langium and Sprotty. It includes the following features:

  • 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 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

  • Implement a diagram model generator by extending LangiumDiagramGenerator
  • Add SprottyDiagramServices to the dependency injection module of your language and bind the diagram.DiagramGenerator service
  • Add DefaultSprottyModule to the inject function that sets up your dependency injection container
  • Call the addDiagramHandler function in your main code to hook into the JSON-RPC stream

Keywords

language

FAQs

Package last updated on 19 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts