Collection of TextMate grammars and themes, converted to JSON and re-distributed as npm packages. Extracted from Shiki, available for general usage.
Packages are automatically updated and published every day (if there are changes).
[!NOTE]
For new grammars to be accepted, we typically require the language to be popular and have a significant number of users. Usually we see GitHub’s linguist repo as a marker for this. If you language is not in linguist, we would recommend adding it there first.Meanwhile, to use a grammar with Shiki, you can always provide a custom grammar locally.
pnpm install.sources-grammars.ts.<id>.sample for your language under ./samples. A sample should include a variety of language syntaxes and succinctly capture the idiosyncrasy of a language. Format requirements:# From https://poignant.guide/book/chapter-5.html)..env file and paste your generated token into the file like so:GITHUB_TOKEN=your-personal-access-token
pnpm run fetch to download the grammar.pnpm run play to start the playground. Select the new grammar in the left column to verify the accuracy and confirm that the grammar works as expected.[!NOTE]
For new themes to be accepted, we typically require the theme to be popular and have a significant number of users. Like over50K downloadson VS Code marketplace, or over300 starson GitHub.Meanwhile, to use a theme with Shiki, you can always provide a custom theme locally.
pnpm install.sources-themes.ts..env file and paste your generated token into the file like so:GITHUB_TOKEN=your-personal-access-token
pnpm run fetch to download the theme.pnpm run play to start the playground. Select the new theme in the right column to verify the accuracy and confirm that the theme works as expected.The grammars and themes included in this package are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in Grammars NOTICE and Themes NOTICE.
All other files MIT © Pine Wu & Anthony Fu.