Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add @operator, @lifetime and @punctuation.delimiters captures for Rust (#10885)

James Thurleyd3f6ca7a1ed2
diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm
index 79a50185aad..b98812fe391 100644
--- a/crates/languages/src/rust/highlights.scm
+++ b/crates/languages/src/rust/highlights.scm
@@ -64,6 +64,16 @@
"<" @punctuation.bracket
">" @punctuation.bracket)
+[
+ ";"
+ ","
+ "::"
+] @punctuation.delimiter
+
+[
+ "#"
+] @punctuation.special
+
[
"as"
"async"
@@ -122,3 +132,50 @@
(line_comment)
(block_comment)
] @comment
+
+[
+ "!"
+ "!="
+ "%"
+ "%="
+ "&"
+ "&="
+ "&&"
+ "*"
+ "*="
+ "*"
+ "+"
+ "+="
+ ","
+ "-"
+ "-="
+ "->"
+ "."
+ ".."
+ "..="
+ "..."
+ "/"
+ "/="
+ ":"
+ ";"
+ "<<"
+ "<<="
+ "<"
+ "<="
+ "="
+ "=="
+ "=>"
+ ">"
+ ">="
+ ">>"
+ ">>="
+ "@"
+ "^"
+ "^="
+ "|"
+ "|="
+ "||"
+ "?"
+] @operator
+
+(lifetime) @lifetime