https://github.com/treeman/tree-sitter-djot
https://github.com/treeman/tree-sitter-djot
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/treeman/tree-sitter-djot
- Owner: treeman
- License: mit
- Created: 2024-02-28T18:08:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-09-15T18:59:09.000Z (9 months ago)
- Last Synced: 2025-12-03T18:24:34.905Z (7 months ago)
- Language: C
- Homepage:
- Size: 8.29 MB
- Stars: 44
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-djot - tree-sitter-djot - The tree-sitter grammar for Djot. (Syntax Highlighting / Djot → HTML → Djot)
README
# tree-sitter-djot
This is an experimental [Tree-sitter][] grammar for [Djot][].
# Features
Aims to be fully feature complete with the [Djot specification][] with a few extra features:
- Parses an optional frontmatter at the very start of the file, e.g:
````
---toml
tag = "Some value"
---
````
- Parses tight sublists.
Normally in Djot you need to surround a list inside a list with spaces:
```
- List
- Another
- list
```
This grammar doesn't require a space and recognizes this as a sublist:
```
- List
- Another
- list
```
- Parses standalone `TODO`, `NOTE` and `FIXME`.
[Tree-sitter]: https://tree-sitter.github.io/tree-sitter/
[Djot]: https://djot.net/
[Djot specification]: https://htmlpreview.github.io/?https://github.com/jgm/djot/blob/master/doc/syntax.html