Collection of TextMate grammars and themes in JSON
See the codeCollection 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 over
50K 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.We don't maintain the grammars and themes in this repository. This repository only normalizes the grammars and themes from their original repositories and re-distributes them as npm packages. If you want to fix a grammar or theme, you should submit a PR to the original repository.
You can find the original repository and source file locations in sources-grammars.ts and sources-themes.ts.
After upstream PR is merged, this repository will be automatically synced and updated.
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.
(top 30 of 75)
JavaScript
65.5%
TypeScript
26.0%
Prolog
4.2%
Vue
4.1%
Collection of TextMate grammars and themes in JSON
See the codeCollection 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 over
50K 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.We don't maintain the grammars and themes in this repository. This repository only normalizes the grammars and themes from their original repositories and re-distributes them as npm packages. If you want to fix a grammar or theme, you should submit a PR to the original repository.
You can find the original repository and source file locations in sources-grammars.ts and sources-themes.ts.
After upstream PR is merged, this repository will be automatically synced and updated.
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.
(top 30 of 75)
JavaScript
65.5%
TypeScript
26.0%
Prolog
4.2%
Vue
4.1%