changeset 6765:970a6a46c495

feat: add a tree-sitter grammar and highlights for dunst's config (#13458)
author Rotem Horesh <148942120+rotmh@users.noreply.github.com>
date Mon, 05 May 2025 17:08:33 +0300
parents 7594cb9ce89f
children e243a359dba2
files book/src/generated/lang-support.md languages.toml runtime/queries/dunstrc/highlights.scm
diffstat 3 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/book/src/generated/lang-support.md	Mon May 05 09:03:40 2025 -0500
+++ b/book/src/generated/lang-support.md	Mon May 05 17:08:33 2025 +0300
@@ -46,6 +46,7 @@
 | dot | ✓ |  |  | `dot-language-server` |
 | dtd | ✓ |  |  |  |
 | dune | ✓ |  |  |  |
+| dunstrc | ✓ |  |  |  |
 | earthfile | ✓ | ✓ | ✓ | `earthlyls` |
 | edoc | ✓ |  |  |  |
 | eex | ✓ |  |  |  |
--- a/languages.toml	Mon May 05 09:03:40 2025 -0500
+++ b/languages.toml	Mon May 05 17:08:33 2025 +0300
@@ -4339,3 +4339,13 @@
 [[grammar]]
 name = "pug"
 source = { git = "https://github.com/zealot128/tree-sitter-pug", rev = "13e9195370172c86a8b88184cc358b23b677cc46" }
+
+[[language]]
+name = "dunstrc"
+scope = "source.dunstrc"
+comment-tokens = ["#", ";"]
+file-types = [ { glob = "dunst/dunstrc" } ]
+
+[[grammar]]
+name = "dunstrc"
+source = { git = "https://github.com/rotmh/tree-sitter-dunstrc", rev = "9cb9d5cc51cf5e2a47bb2a0e2f2e519ff11c1431" }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/queries/dunstrc/highlights.scm	Mon May 05 17:08:33 2025 +0300
@@ -0,0 +1,14 @@
+(assign
+  (key) @attribute)
+
+(comment) @comment.line
+
+[
+  "["
+  "]"
+] @punctuation.bracket
+
+"=" @operator
+
+(section
+  (name) @namespace)