forked from bai/curriculum-project-hub
feat(filelib-web): 编辑器增加 Typst 语法高亮支持
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
import { json } from "@codemirror/lang-json";
|
||||
import { html } from "@codemirror/lang-html";
|
||||
import { css } from "@codemirror/lang-css";
|
||||
import { typst } from "codemirror-lang-typst";
|
||||
import type { Extension } from "@codemirror/state";
|
||||
|
||||
let { value = "", readonly = false, filename = "", onchange }: {
|
||||
@@ -53,6 +54,9 @@
|
||||
case "css":
|
||||
case "scss":
|
||||
return [css()];
|
||||
case "typ":
|
||||
case "typst":
|
||||
return [typst()];
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user