
Miro Spönemann
Jun 15, 2022
Langium: Design Your Own Language in Node.js and VS Code

#1about 4 minutes
Why you should create a domain-specific language
DSLs empower domain experts to implement business logic directly, overcoming the limitations of general-purpose tools and low-code platforms.
#2about 5 minutes
Fundamental principles of language design
Choose the right paradigm and abstraction level for your DSL, focusing on specificity rather than replicating general-purpose languages like JSON.
#3about 3 minutes
An overview of the Langium framework
Langium is a TypeScript-based toolkit for creating languages with built-in support for the Language Server Protocol (LSP) and VS Code extensions.
#4about 2 minutes
Defining language syntax and structure with a grammar
Use Langium's grammar language to define your language's syntax, including keywords, properties, and cross-references between different elements.
#5about 6 minutes
Demonstrating a Langium-powered VS Code extension
A live demonstration shows how a Langium-based extension provides rich editor features and a command-line interface for code generation.
#6about 4 minutes
How Langium processes code into an abstract syntax tree
Langium tokenizes and parses input text to create an Abstract Syntax Tree (AST), which serves as the central model for all language features.
#7about 5 minutes
Generating TypeScript types from your grammar
Langium automatically infers TypeScript interfaces from your grammar, but also supports explicit type declarations for better long-term project maintenance.
#8about 9 minutes
Scaffolding a new project with the Yeoman generator
Get started quickly by using the `yo langium` command to scaffold a complete, ready-to-use project for your new language.
#9about 7 minutes
Q&A on IDE support and technology stack choices
The discussion covers IDE compatibility, documentation support, and the benefits of a consistent TypeScript stack compared to Java-based alternatives like Xtext.
Related jobs
Jobs that call for the skills explored in this talk.
20 days ago
Senior Software Engineer [TypeScript] (Prisma Postgres)

Prisma
Remote
Senior
26 days ago
Lead Full-Stack Engineer

Hubert Burda Media
Intermediate
Senior
1 month ago
Senior Software Engineer (m/w/d)

Job Ad Partner - Jobvertising Crossmedia GmbH
Remote
Senior