aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/hocon/highlights.scm31
-rw-r--r--runtime/queries/hocon/indents.scm10
2 files changed, 41 insertions, 0 deletions
diff --git a/runtime/queries/hocon/highlights.scm b/runtime/queries/hocon/highlights.scm
new file mode 100644
index 00000000..d1aa38a2
--- /dev/null
+++ b/runtime/queries/hocon/highlights.scm
@@ -0,0 +1,31 @@
+(comment) @comment
+
+(null) @constant.builtin
+[(true) (false)] @constant.builtin.boolean
+(number) @constant.numeric
+(string) @string
+(multiline_string) @string
+(string (escape_sequence) @constant.character.escape)
+(unquoted_string) @string
+
+(value [":" "=" "+=" ] @operator)
+
+(substitution (_) @string)
+(substitution ["${" "${?" "}"] @punctuation.special)
+
+[
+ "url"
+ "file"
+ "classpath"
+ "required"
+] @function.builtin
+
+(include) @keyword.directive
+
+[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
+
+(unit) @keyword
+(path (_) @keyword)
+(unquoted_path "." @punctuation.delimiter)
+[ "," ] @punctuation.delimiter
+
diff --git a/runtime/queries/hocon/indents.scm b/runtime/queries/hocon/indents.scm
new file mode 100644
index 00000000..27c2c988
--- /dev/null
+++ b/runtime/queries/hocon/indents.scm
@@ -0,0 +1,10 @@
+[
+ (object)
+ (array)
+] @indent
+
+[
+ "]"
+ "}"
+] @outdent
+