really good syntax highlighting for markdown and MDX
52
stars
64
commits
JavaScript
primary language
Nov 11, 2024
updated
Really good syntax highlighting for markdown and MDX.
This project includes high quality TextMate grammars for markdown and MDX.
Try it out in the playground »
You can use these grammars in your code editor or with
starry-night and shiki.
starry-nightThese grammars are in github-linguist/linguist,
which means that they are also in starry-night.
shikiThese grammars are in Shiki.
For the MDX grammar,
use: vscode-mdx.
I’m not a Sublime or TextMate user and I am not very interested in maintaining
a packages for them currently.
You should be able to clone this repo somewhere
(~/.config/sublime-text-2/Packages?),
then you should reportedly be able to use these grammars.
PR welcome to improve this section or do the work to make it happen :)
After installing, type some things!
There is no API.
You can generate your own grammars, by modifying languages in build.js.
To illustrate, you can add a new language there, or turn on or off several
extensions (such as gfm) in the existing ones.
Markdown is handled according to CommonMark and common extensions:
(†) — with two or more dollars.
The markdown grammar supports CommonMark and common extensions: directives, frontmatter, GFM, GitHub, and math. The MDX grammar is similar, but of course uses the MDX syntax extensions, and does not include directives.
Should be good!
micromark
— markdown parser in JavaScriptmarkdown-rs
— markdown parser in RustYes please! See How to Contribute to Open Source.
In particular, see grammar.yml, that’s likely where your changes will go,
and it includes a ton of information on how it all works.
You might also want to check if the grammars here work with linguist. Perform these steps:
git clone gh:github/linguist
cd linguist
./script/bootstrap
# copy/paste this repo in `linguist`
script/grammar-compiler add markdown-tm-language
JavaScript
99.2%
really good syntax highlighting for markdown and MDX
52
stars
64
commits
JavaScript
primary language
Nov 11, 2024
updated
Really good syntax highlighting for markdown and MDX.
This project includes high quality TextMate grammars for markdown and MDX.
Try it out in the playground »
You can use these grammars in your code editor or with
starry-night and shiki.
starry-nightThese grammars are in github-linguist/linguist,
which means that they are also in starry-night.
shikiThese grammars are in Shiki.
For the MDX grammar,
use: vscode-mdx.
I’m not a Sublime or TextMate user and I am not very interested in maintaining
a packages for them currently.
You should be able to clone this repo somewhere
(~/.config/sublime-text-2/Packages?),
then you should reportedly be able to use these grammars.
PR welcome to improve this section or do the work to make it happen :)
After installing, type some things!
There is no API.
You can generate your own grammars, by modifying languages in build.js.
To illustrate, you can add a new language there, or turn on or off several
extensions (such as gfm) in the existing ones.
Markdown is handled according to CommonMark and common extensions:
(†) — with two or more dollars.
The markdown grammar supports CommonMark and common extensions: directives, frontmatter, GFM, GitHub, and math. The MDX grammar is similar, but of course uses the MDX syntax extensions, and does not include directives.
Should be good!
micromark
— markdown parser in JavaScriptmarkdown-rs
— markdown parser in RustYes please! See How to Contribute to Open Source.
In particular, see grammar.yml, that’s likely where your changes will go,
and it includes a ton of information on how it all works.
You might also want to check if the grammars here work with linguist. Perform these steps:
git clone gh:github/linguist
cd linguist
./script/bootstrap
# copy/paste this repo in `linguist`
script/grammar-compiler add markdown-tm-language
JavaScript
99.2%