Skip to content

Commit

Permalink
Fix syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lotes committed Mar 20, 2024
1 parent e0e3ec5 commit 8e6a210
Show file tree
Hide file tree
Showing 3 changed files with 258 additions and 502 deletions.
7 changes: 3 additions & 4 deletions hugo/content/playground/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
LangiumTextMateContent,
DSLInitialContent,
} from "./data.js";
import { generateMonarch } from "./monarch-generator.js";
import { decompressFromEncodedURIComponent } from 'lz-string';
import { Disposable } from "vscode-languageserver";
import { render } from './Tree.js';
Expand All @@ -18,7 +17,7 @@ import { addMonacoStyles, createUserConfig, MonacoEditorLanguageClientWrapper }
import { DocumentChangeResponse } from "langium-ast-helper";
import { DefaultAstNodeLocator } from "langium";
import { createServicesForGrammar } from "langium/grammar";

import { generateTextMate } from "./textmate-generator.js";
export { share, overlay } from './utils.js';
export { addMonacoStyles, MonacoEditorLanguageClientWrapper };

Expand Down Expand Up @@ -221,7 +220,7 @@ async function getFreshDSLWrapper(
languageId,
code,
worker,
monarchGrammar: generateMonarch(Grammar, languageId)
textmateGrammar: generateTextMate(Grammar, {id: languageId, grammar: 'UserGrammar'})
}), htmlElement).then(() => {
return wrapper;
}).catch(async (e: any) => {
Expand Down Expand Up @@ -252,7 +251,7 @@ async function getFreshLangiumWrapper(htmlElement: HTMLElement): Promise<MonacoE
languageId: "langium",
code: currentGrammarContent,
worker: "./libs/worker/langiumServerWorker.js",
LangiumTextMateContent: LangiumTextMateContent
textmateGrammar: LangiumTextMateContent
}), htmlElement);
return langiumWrapper;
}
Expand Down
Loading

0 comments on commit 8e6a210

Please sign in to comment.