Skip to content

rahman-O/textmate-grammars-themes

 
 

Repository files navigation

tm-grammars / tm-themes

tm-grammars tm-themes

Collection of TextMate grammars and themes, converted in JSON format and re-distributed as npm packages.

Packages are automatically updated and published every day (if there are changes).

Scripts are extracted and modified from Shiki.

Contribute

Add a new grammar

  1. Fork this repository
  2. Install the dependencies with pnpm i
  3. Add grammar source and metadata to sources-grammars.ts
  4. Add a code sample file <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:
  1. Generate a personal access token, keep the default, no extra permission is needed. This token is used to query public information from GitHub API and avoid rate limits.
  2. Create a .env file and paste your generated token into the file like so:
GITHUB_TOKEN=your-personal-access-token
  1. Run pnpm run fetch to download the grammar and verify it works
  2. Send in the PR!

Add a new theme

  1. Fork this repository
  2. Install the dependencies with pnpm i
  3. Add theme source and metadata to sources-themes.ts
  4. Generate a personal access token, keep the default, no extra permission is needed. This token is used to query public information from GitHub API and avoid rate limits.
  5. Create a .env file and paste your generated token into the file like so:
GITHUB_TOKEN=your-personal-access-token
  1. Run pnpm run fetch to download the theme and verify it works
  2. Send in the PR!

License

The grammars 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

About

Collection of TextMate grammars and themes in JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.2%
  • TypeScript 35.8%