Skip to content

Migrate over Langium Generation and Integration Guides#1044

Merged
kaisalmen merged 6 commits into
TypeFox:mainfrom
montymxb:montymxb/add-langium-web-project-gen
Jun 26, 2026
Merged

Migrate over Langium Generation and Integration Guides#1044
kaisalmen merged 6 commits into
TypeFox:mainfrom
montymxb:montymxb/add-langium-web-project-gen

Conversation

@montymxb

Copy link
Copy Markdown
Member

Closes #868 by bringing over a pair of Langium guides that demonstrated how to integrate & leverage Langium + Monaco. Those have been out of date on the Langium side, and needed a bit of tlc, so I refreshed them and brought them over here. Most of the content is from the original tutorial, but rewritten and adapted for the new MLC api and any changes since Langium 3.X.

The updated sections have been setup so they should follow after the practical examples section, by building up into a Langium context. The first guide is about setting up and integrating an LS worker built on the Langium side (very similar to the existing guide). The second one has been adapted to instead focus on how to work with notifications & requests instead of 'generation' by itself. This broadens the scope of application a bit, so it should be clearer that although generation is a use case, it's not the only thing you could be doing there.

Lastly this keeps with the existing trend of using the langium-minilogo example language. However the guides have both been updated to walk through the process generally as well as concretely via minilogo, so it should be helpful for users who want to know the general flow or see a concrete example.

There's a new minilogo example added in as well for reference, which consumes a pre-built LS rather than integrate the source directly. I updated the language up to Langium v4.3.0 as well, after it had been sitting for a couple years collecting a bit of dust 🧹 .

@kaisalmen kaisalmen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much. 🎉
One link needs to be corrected. Then it is ready to go.
The other comment is just for info.

Comment thread packages/examples/ghp_minilogo.html Outdated
// your services import will differ based on your language
import { createMyLanguageServices } from './my-language-module.js';

declare const self: DedicatedWorkerGlobalScope;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, with this option, you do not need to use WebWorker in the compiler options lib:

/// <reference lib="WebWorker" />

@kaisalmen kaisalmen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kaisalmen kaisalmen merged commit e9b18da into TypeFox:main Jun 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Langium project generation and documentation

2 participants