feat(filelib-web): 编辑器增加 Typst 语法高亮支持

This commit is contained in:
2026-07-27 21:02:02 +08:00
parent fe38d0b8a9
commit 8c26c42e0c
4 changed files with 35 additions and 50 deletions
@@ -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 [];
}