diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm index 0c3aa7efc7..8d4bad06e0 100644 --- a/crates/languages/src/rust/highlights.scm +++ b/crates/languages/src/rust/highlights.scm @@ -139,7 +139,6 @@ ] @comment.doc [ - "!" "!=" "%" "%=" @@ -159,7 +158,6 @@ ".." "..=" "..." - "/" "/=" ":" ";" @@ -183,6 +181,10 @@ "?" ] @operator +; Avoid highlighting these as operators when used in doc comments. +(unary_expression "!" @operator) +operator: "/" @operator + (lifetime) @lifetime (parameter (identifier) @variable.parameter)