Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/rust-format-args/highlights.scm')
| -rw-r--r-- | runtime/queries/rust-format-args/highlights.scm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/runtime/queries/rust-format-args/highlights.scm b/runtime/queries/rust-format-args/highlights.scm new file mode 100644 index 00000000..7baea85a --- /dev/null +++ b/runtime/queries/rust-format-args/highlights.scm @@ -0,0 +1,30 @@ +; regular escapes like `\n` are detected using another grammar +; Here, we only detect `{{` and `}}` as escapes for `{` and `}` +(escaped) @constant.character.escape + +[ + "#" + (type) +] @special + +[ + (sign) + (fill) + (align) + (width) +] @operator + +(number) @constant.numeric + +(colon) @punctuation + +(identifier) @variable + +; SCREAMING_CASE is assumed to be constant +((identifier) @constant + (#match? @constant "^[A-Z_]+$")) + +[ + "{" + "}" +] @punctuation.special |