diff options
| author | Sergio Alejandro Vargas <savargasqu+git@unal.edu.co> | 2021-09-16 15:51:10 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-09-26 12:24:48 +0200 |
| commit | 0cd64db48fc0da5e061defbf99c3e945bb886959 (patch) | |
| tree | bcf7a556dc480354a4e7b34bb19f45abefcbeaa3 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.tar nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.tar.gz nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.tar.bz2 nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.tar.lz nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.tar.xz nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.tar.zst nvim-treesitter-0cd64db48fc0da5e061defbf99c3e945bb886959.zip | |
highlights(rust): Fix angle brackets, and closures
Highlight angle brackets in type parameters and bars in closures bars as
`@punctuation.bracket` not as `@operator`.
| -rw-r--r-- | queries/rust/highlights.scm | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm index 446ba1c76..72a5b1e14 100644 --- a/queries/rust/highlights.scm +++ b/queries/rust/highlights.scm @@ -112,32 +112,6 @@ (block_comment) ] @comment -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -(type_arguments - "<" @punctuation.bracket - ">" @punctuation.bracket) -(type_parameters - "<" @punctuation.bracket - ">" @punctuation.bracket) - -[ -"::" -"." -";" -"," -] @punctuation.delimiter - -(attribute_item "#" @punctuation.special) -(inner_attribute_item ["#" "!"] @punctuation.special) - (parameter (identifier) @parameter) (closure_parameters (_) @parameter) @@ -254,4 +228,31 @@ "?" ] @operator -(closure_parameters "|" @operator "|" @operator) +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +(closure_parameters "|" @punctuation.bracket) + +(type_arguments + "<" @punctuation.bracket + ">" @punctuation.bracket) +(type_parameters + "<" @punctuation.bracket + ">" @punctuation.bracket) + +[ +"::" +"." +";" +"," +] @punctuation.delimiter + +(attribute_item "#" @punctuation.special) +(inner_attribute_item ["#" "!"] @punctuation.special) + |
