Skip to content

Conversation

@montymxb
Copy link

@montymxb montymxb commented Oct 27, 2025

This PR adds language support for the Langium grammar language.

Description

Langium is both the name of the grammar language and the associated language engineering framework (akin in some ways to Xtext, if that rings a bell). Langium grammar files are written and used to generate an associated parser configuration as well as types for the abstract syntax, cross-ref information, and other helpful details.

Altogether it's typically used to generate language implementations with LSP support. Common use cases are building vscode extensions for supporting domain specific languages, syntax highlighting & generation tools.

  • I am adding a new language.

    • The extension of the new language is used in hundreds of repositories on GitHub.com.
      • Search results for each extension:
    • I have included a real-world usage sample for all extensions added in this PR:
    • I have included a syntax highlighting grammar: [TODO Add highlighting grammar]
    • I have added a color

    - [ ] I have updated the heuristics to distinguish my language from others using the same extension.

The C4 examples is a little long, verging on 1k loc. Let me know if it would be preferable to switch out for something more compact.

@montymxb montymxb requested a review from a team as a code owner October 27, 2025 10:08
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

The C4 examples is a little long, verging on 1k loc. Let me know if it would be preferable to switch out for something more compact.

Yes please. If the sample is suppressed in the diff, it's too big.

You're also not finished with this PR… you've missed step 4 😉

@montymxb
Copy link
Author

Hey @lildude , thanks for the input! Yeah wondered about that too as soon as I was looking at the diff again here (was coming back to something I had sketched up nearly a month ago).

Ahh, whoops! Totally missed that one, thanks for pointing that out. I'll set as draft until both of those are sorted out.

@montymxb montymxb marked this pull request as draft October 27, 2025 11:12
@montymxb montymxb marked this pull request as ready for review October 27, 2025 12:24
@montymxb
Copy link
Author

Both points addressed regarding:

  • c4 example (swapped with ox, a minified lox example)
  • missing uid

@montymxb montymxb requested a review from lildude October 27, 2025 12:26
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.

2 participants