Closed xkwxdyy closed 2 weeks ago
希望官方能支持 LaTeX3 语法(expl3)高亮。
我尝试了 shiki 官网的方法 按照它的配置在.vitepress/config.mts 中加入了
.vitepress/config.mts
import { getHighlighter } from 'shiki' const latex3 = JSON.parse(fs.readFileSync('../../LaTeX-Expl3.tmLanguage.json', 'utf8')) const highlighter = await getHighlighter({ langs: [latex3], themes: ['vitesse-light'] }) const html = highlighter.codeToHtml(code, { lang: 'my-lang', theme: 'vitesse-light' })
但是 VScode 提示我
找不到名称“fs”。 找不到名称“code”。
我没有什么 ts 代码基础,不知道怎么改。但是 LaTeX3 用得也很普遍,所以希望官方能够支持,这样就不需要我额外配置了。
调用 VScode 的 LaTeX-Workshop 里的高亮就行
No response
Refer #3779
Is your feature request related to a problem? Please describe.
希望官方能支持 LaTeX3 语法(expl3)高亮。
我尝试了 shiki 官网的方法 按照它的配置在
.vitepress/config.mts
中加入了但是 VScode 提示我
我没有什么 ts 代码基础,不知道怎么改。但是 LaTeX3 用得也很普遍,所以希望官方能够支持,这样就不需要我额外配置了。
Describe the solution you'd like
调用 VScode 的 LaTeX-Workshop 里的高亮就行
Describe alternatives you've considered
No response
Additional context
No response
Validations