Skip to content
Discussion options

You must be logged in to vote

Hi @kaby76,

Does Langium support LSP?

Yes, Langium supports LSP and semantic tokens in particular. Langium's grammar DSL is written in Langium (and uses semantic tokens), so you can see the Langium source code for an example use case:

  1. Implement your custom SemanticTokensProvider (for that it's enough to extend AbstractSemanticTokenProvider like Langium does it here)
  2. Register your custom service in <your-dsl-name>-module.ts (like here)

As for the TextMate file: this is not a replacement for semantic tokens, but rather an extra way to have highlighting. We generate also a Monarch file (for instance, a Monarch file for the statemachine example, generation of which can be enabled in lang…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by msujew
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants