mystmd
mystmd copied to clipboard
Investigate the use of shiki as the library for syntax highlighting
trafficstars
Proposal
Use shiki, https://shiki.style/, as the syntax highlighting library for mystmd. It uses the same syntax highlighting engine as vscode and has very good tooling.
- It uses TextMate grammars for its language definitions. Which is the same definitions that are used by vscode and GitHub's linquist among others.
- The output it produces is very good.
- there is a large number of high-quality language definitions already defined.
- It also allows reusing vscode color themes.
- It is supports being run in a compilation step for static generation and at runtime in the end users browser.
- It has a extensive API for defining transformations and decorations
Additional notes
It is used in a lot of open source projects
- Astro
- Nuxt
- vitepress