diff options
Diffstat (limited to 'queries/jsonnet/highlights.scm')
| -rw-r--r-- | queries/jsonnet/highlights.scm | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/queries/jsonnet/highlights.scm b/queries/jsonnet/highlights.scm new file mode 100644 index 000000000..eb8d22be9 --- /dev/null +++ b/queries/jsonnet/highlights.scm @@ -0,0 +1,76 @@ +[ + (true) + (false) +] @boolean + +(comment) @comment +(id) @variable +(import) @include +(null) @constant.builtin +(number) @number +(string) @string + +(fieldname (id) @label) + +[ + "[" + "]" + "{" + "}" + "(" + ")" +] @punctuation.bracket + +[ + "." + "," + ";" + ":" + "::" + ":::" +] @punctuation.delimiter + +(expr + operator: (_) @operator) +[ + "+" + "=" +] @operator + +"in" @keyword.operator + +[ + (local) + "assert" +] @keyword + +[ + "else" + "if" + "then" +] @conditional + +[ + (dollar) + (self) +] @variable.builtin +((id) @variable.builtin + (#eq? @variable.builtin "std")) + +; Function declaration +(bind + function: (id) @function + params: (params + (param + identifier: (id) @parameter))) + +; Function call +(expr + (expr (id) @function.call) + "(" + (args + (named_argument + (id) @parameter))? + ")") + +(ERROR) @error |
