Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

langium

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langium

A language engineering tool for the Language Server Protocol

  • 3.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
174K
decreased by-15.52%
Maintainers
4
Weekly downloads
 
Created

What is langium?

Langium is a tool for developing domain-specific languages (DSLs) and language servers. It provides a framework for creating custom languages with a focus on language design, parsing, and tooling support.

What are langium's main functionalities?

Language Definition

Langium allows you to define a custom language using a grammar syntax. This code sample demonstrates how to define a simple DSL with a model and elements using Langium's grammar services.

const { createLangiumGrammarServices } = require('langium');
const services = createLangiumGrammarServices();
const grammar = `grammar MyDSL
entry Model:
    'model' name=ID '{'
        (elements+=Element)*
    '}';
Element:
    'element' name=ID;`;
services.GrammarParser.parse(grammar);

Language Server

Langium can be used to create a language server that provides IDE features like auto-completion and error checking for your custom language. This code sample shows how to start a language server for a simple DSL.

const { startLanguageServer } = require('langium');
startLanguageServer({
    grammar: `grammar MyDSL
entry Model:
    'model' name=ID '{'
        (elements+=Element)*
    '}';
Element:
    'element' name=ID;`,
    port: 5000
});

Other packages similar to langium

Keywords

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc