{"id":13930032,"url":"https://github.com/eclipse-sprotty/sprotty-vscode","last_synced_at":"2026-03-11T04:03:31.875Z","repository":{"id":37395447,"uuid":"220017506","full_name":"eclipse-sprotty/sprotty-vscode","owner":"eclipse-sprotty","description":"sprotty-vscode","archived":false,"fork":false,"pushed_at":"2026-02-09T11:31:13.000Z","size":36403,"stargazers_count":61,"open_issues_count":1,"forks_count":22,"subscribers_count":13,"default_branch":"master","last_synced_at":"2026-02-22T10:30:19.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-sprotty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-06T14:36:19.000Z","updated_at":"2026-02-09T11:31:16.000Z","dependencies_parsed_at":"2026-02-19T07:01:39.374Z","dependency_job_id":null,"html_url":"https://github.com/eclipse-sprotty/sprotty-vscode","commit_stats":null,"previous_names":["eclipse/sprotty-vscode"],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-sprotty/sprotty-vscode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-sprotty%2Fsprotty-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-sprotty%2Fsprotty-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-sprotty%2Fsprotty-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-sprotty%2Fsprotty-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-sprotty","download_url":"https://codeload.github.com/eclipse-sprotty/sprotty-vscode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-sprotty%2Fsprotty-vscode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30370283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-07T18:02:48.455Z","updated_at":"2026-03-11T04:03:31.847Z","avatar_url":"https://github.com/eclipse-sprotty.png","language":"TypeScript","funding_links":[],"categories":["others","TypeScript"],"sub_categories":[],"readme":"[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/eclipse/sprotty-vscode)\n\n# sprotty-vscode\n\nThis repository contains the glue code to integrate [Sprotty diagrams](https://github.com/eclipse/sprotty) - with or without a language server - in VSCode extensions.\n\nAlso contains an example extension for a domain-specific language for statemachines. The example is also available as _States Example_ from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=typefox.states-extension).\n\n![Screenshot](images/screenshot.png)\n\n## Features\n\n* running Sprotty diagrams in VS Code webviews,\n* SVG export (ALT-E), animated center selection (ALT-C) and fit to screen (ALT-F) actions,\n* interaction with Sprotty-enhanced language servers to automatically synchronize diagrams with language artifacts.\n\n## Architecture\n\nIn VS Code, extensions can contribute new UI components using a webview. Webviews communicate with the extension using the [`vscode-messenger`](https://github.com/TypeFox/vscode-messenger) library. The [`WebviewPanelManager`](./packages/sprotty-vscode/src/webview-panel-manager.ts) uses this to send and receive Sprotty Actions to and from a [`WebviewEndpoint`](./packages/sprotty-vscode/src/webview-endpoint.ts). The latter runs a webpacked `bundle.js` that contains the Sprotty diagram code.\n\n![Architecture Diagram](images/architecture.png)\n\nIf your extension provides a language, you can include a [Sprotty-enhanced language server](https://github.com/eclipse/sprotty-server) to get fully synchronized diagrams for your language artifacts. The [`SprottyLspVscodeExtension`](./packages/sprotty-vscode/src/lsp/sprotty-lsp-vscode-extension.ts) acts as a relay between the language server and a [`SprottyLanguageWebview`](./packages/sprotty-vscode/src/lsp/sprotty-lsp-webview.ts), and intercepts actions/LSP messages that require to interact with the VS Code workbench.\n\n## Contents\n\nThe repo is structured as follows\n- `examples`: an example Sprotty visualization using a [Langium](https://langium.org/)-based Language Server.\n- `packages/sprotty-vscode`: library code for the VSCode extension.\n- `packages/sprotty-vscode-protocol`: common protocol classes for the communication between the extension and the webview.\n- `packages/sprotty-vscode-webview`: library code for the script that is run in the webview.\n\n## Development\n\nCompile the library code and the examples:\n```\nyarn\n```\n\nIf you also want to use the older Xtext-based example, you need to run this command before `yarn`:\n```\n./examples/states-xtext/language-server/gradlew -p examples/states-xtext/language-server/ build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-sprotty%2Fsprotty-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-sprotty%2Fsprotty-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-sprotty%2Fsprotty-vscode/lists"}