
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
Langium is a language engineering tool with built-in support for the Language Server Protocol. It has a simple and direct integration with the VS Code extension API.
More information: 🌍 https://langium.org
Langium offers a Yeoman generator to create a new language extension for VS Code. The only prerequisite for the following terminal commands is NodeJS version 16 or higher.
npm install -g yo generator-langium
yo langium
hello-world with the extension name you chose).code hello-world
Press F5 to launch the extension in a new Extension Development Host window.
Open a folder, create a file with your chosen file name extension (.hello is the default), and see that validation and completion (ctrl+space) works:
Follow the instructions in langium-quickstart.md (in your extension folder) and the documentation on the website to go further.
The core of Langium is a grammar declaration language in which you describe multiple aspects of your language:
Please follow the Langium documentation to learn how to use this language.
Langium features a command line interface (langium-cli) that reads a grammar declaration and generates TypeScript type declarations for the AST and more.
Integration with the Language Server Protocol (LSP) is done with vscode-languageserver. You have full access to the LSP API in Langium, so you can register additional message handlers or extend the protocol in a breeze.
The main code of Langium consists of a set of services that are connected via dependency injection (DI). You can override the default functionality and add your own service classes by specifying a DI module.
The source repository of Langium includes examples that demonstrate different use cases.
ANTLR (Another Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It is similar to Langium in that it allows you to define grammars and generate parsers, but it is more focused on parsing and less on providing language server features.
PEG.js is a simple parser generator for JavaScript that produces fast parsers with excellent error reporting. It is similar to Langium in terms of grammar definition and parsing capabilities, but it does not provide built-in support for language servers or IDE features.
Lezer is a parser system for JavaScript that is designed to be small and fast. It is similar to Langium in that it allows you to define grammars and create parsers, but it is more lightweight and does not include language server capabilities.
FAQs
A language engineering tool for the Language Server Protocol
The npm package langium receives a total of 3,488,884 weekly downloads. As such, langium popularity was classified as popular.
We found that langium demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

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.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.