diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index 3be5651951..f0c5c3cf31 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json @@ -24,6 +24,9 @@ } }, "patterns": [ + { + "include": "#block-comments" + }, { "include": "#comments" }, @@ -184,6 +187,9 @@ } }, "patterns": [ + { + "include": "#block-comments" + }, { "include": "#comments" }, @@ -211,6 +217,9 @@ } }, "patterns": [ + { + "include": "#block-comments" + }, { "include": "#comments" }, @@ -231,6 +240,9 @@ } ] }, + { + "include": "#block-comments" + }, { "include": "#comments" }, @@ -277,23 +289,22 @@ { "comment": "documentation comments", "name": "comment.line.documentation.rust", - "match": "^\\s*///.*", - "patterns": [ - { - "include": "#comments" - } - ] + "match": "^\\s*///.*" }, { "comment": "line comments", "name": "comment.line.double-slash.rust", - "match": "\\s*//.*", - "patterns": [ - { - "include": "#comments" - } - ] + "match": "\\s*//.*" }, + { + "comment": "inferred types, wildcard patterns, ignored params", + "name": "comment.char.underscore.rust", + "match": "\\b_\\w*\\b[^!(]" + } + ] + }, + "block-comments": { + "patterns": [ { "comment": "block comments", "name": "comment.block.rust", @@ -301,7 +312,7 @@ "end": "\\*/", "patterns": [ { - "include": "#comments" + "include": "#block-comments" } ] }, @@ -312,14 +323,9 @@ "end": "\\*/", "patterns": [ { - "include": "#comments" + "include": "#block-comments" } ] - }, - { - "comment": "inferred types, wildcard patterns, ignored params", - "name": "comment.char.underscore.rust", - "match": "\\b_\\w*\\b" } ] }, @@ -450,6 +456,9 @@ } }, "patterns": [ + { + "include": "#block-comments" + }, { "include": "#comments" }, @@ -516,6 +525,9 @@ } }, "patterns": [ + { + "include": "#block-comments" + }, { "include": "#comments" }, @@ -797,6 +809,9 @@ } }, "patterns": [ + { + "include": "#block-comments" + }, { "include": "#comments" },