aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/dot
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/dot')
-rw-r--r--runtime/queries/dot/highlights.scm49
-rw-r--r--runtime/queries/dot/indents.scm9
-rw-r--r--runtime/queries/dot/injections.scm5
3 files changed, 63 insertions, 0 deletions
diff --git a/runtime/queries/dot/highlights.scm b/runtime/queries/dot/highlights.scm
new file mode 100644
index 000000000..75ad92271
--- /dev/null
+++ b/runtime/queries/dot/highlights.scm
@@ -0,0 +1,49 @@
+(identifier) @type
+
+[
+ "strict"
+ "graph"
+ "digraph"
+ "subgraph"
+ "node"
+ "edge"
+] @keyword
+
+(string_literal) @string
+
+(number_literal) @number
+
+[
+ (edgeop)
+ (operator)
+] @operator
+
+[
+ ","
+ ";"
+] @punctuation.delimiter
+
+[
+ "{"
+ "}"
+ "["
+ "]"
+ "<"
+ ">"
+] @punctuation.bracket
+
+(subgraph
+ id: (id
+ (identifier) @module))
+
+(attribute
+ name: (id
+ (identifier) @variable.member))
+
+(attribute
+ value: (id
+ (identifier) @constant))
+
+(comment) @comment @spell
+
+(preproc) @keyword.directive
diff --git a/runtime/queries/dot/indents.scm b/runtime/queries/dot/indents.scm
new file mode 100644
index 000000000..a951e5511
--- /dev/null
+++ b/runtime/queries/dot/indents.scm
@@ -0,0 +1,9 @@
+[
+ (block)
+ (attr_list)
+] @indent.begin
+
+[
+ "}"
+ "]"
+] @indent.branch @indent.end
diff --git a/runtime/queries/dot/injections.scm b/runtime/queries/dot/injections.scm
new file mode 100644
index 000000000..4fe39a8ba
--- /dev/null
+++ b/runtime/queries/dot/injections.scm
@@ -0,0 +1,5 @@
+((html_internal) @injection.content
+ (#set! injection.language "html"))
+
+((comment) @injection.content
+ (#set! injection.language "comment"))