Skip to content
Discussion options

You must be logged in to vote

Alright, I figured it out.

This seems to be a VsCode specific feature, so it has to happen on the client. However, all the information we need is on the server. So what we do is, after the documents have been validated, send a message to the client with the positions of all the decorations to apply.

mynx-decorator.ts:

import { DocumentState, LangiumSharedServices, streamAst } from "langium";
import { exists } from "../utils";
import { inferType } from "./type-system/infer-type";
import { MynxType } from "./type-system/mynx-type";
import { isCodeBlockExpr, Model } from "./generated/ast";
import { DiagnosticSeverity, Position } from "vscode-languageserver";

export function attachDecorator(s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MechMel
Comment options

Answer selected by MechMel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant