feat: add a tree-sitter grammar and highlights for dunst's configuration format

pull/13458/head
rotmh 2025-05-02 14:12:15 +03:00
parent aa3fad84ef
commit c7b284d561
No known key found for this signature in database
GPG Key ID: FA5492BE76A4974A
3 changed files with 26 additions and 0 deletions

View File

@ -46,6 +46,7 @@
| dot | ✓ | | | `dot-language-server` | | dot | ✓ | | | `dot-language-server` |
| dtd | ✓ | | | | | dtd | ✓ | | | |
| dune | ✓ | | | | | dune | ✓ | | | |
| dunstrc | ✓ | | | |
| earthfile | ✓ | ✓ | ✓ | `earthlyls` | | earthfile | ✓ | ✓ | ✓ | `earthlyls` |
| edoc | ✓ | | | | | edoc | ✓ | | | |
| eex | ✓ | | | | | eex | ✓ | | | |

View File

@ -4313,3 +4313,14 @@ comment-tokens = "#"
[[grammar]] [[grammar]]
name = "debian" name = "debian"
source = { git = "https://gitlab.com/MggMuggins/tree-sitter-debian", rev = "9b3f4b78c45aab8a2f25a5f9e7bbc00995bc3dde" } source = { git = "https://gitlab.com/MggMuggins/tree-sitter-debian", rev = "9b3f4b78c45aab8a2f25a5f9e7bbc00995bc3dde" }
[[language]]
name = "dunstrc"
scope = "source.dunstrc"
comment-tokens = ["#", ";"]
file-types = [ { glob = "dunst/dunstrc" } ]
grammar = "dunstrc"
[[grammar]]
name = "dunstrc"
source = { git = "https://github.com/rotmh/tree-sitter-dunstrc", rev = "b2d193553603c41762418d67827883492c9119a3" }

View File

@ -0,0 +1,14 @@
(assign
(key) @attribute)
(comment) @comment.line
[
"["
"]"
] @punctuation.bracket
"=" @operator
(section
(name) @namespace)