{ "name": "Rust", "comments": { "start": "// " }, "scopes": { "source_file": "source.rust", "type_identifier": "support.type.other", "primitive_type": "support.type.primitive", "empty_type": "support.type.never", "unit_type": "support.type.unit", "field_identifier, field_expression > integer_literal": "entity.name.variable.field", "line_comment": [ { "match": "^\\s*///", "scopes": "comment.block.line.docstr" }, "comment.block.line" ], "block_comment": "comment.block.block", "identifier": [ { "match": "^[A-Z\\d_]{2,}$", "scopes": "constant.other" } ], "macro_invocation > identifier,\nmacro_invocation > \"!\",": "entity.name.macro.call", "macro_definition > identifier": "entity.name.macro.def", "metavariable": "variable.other.meta", "fragment_specifier > \"block\"": "support.type.fragment.block", "fragment_specifier > \"expr\"": "support.type.fragment.expr", "fragment_specifier > \"ident\"": "support.type.fragment.ident", "fragment_specifier > \"item\"": "support.type.fragment.item", "fragment_specifier > \"meta\"": "support.type.fragment.meta", "fragment_specifier > \"pat\"": "support.type.fragment.pat", "fragment_specifier > \"path\"": "support.type.fragment.path", "fragment_specifier > \"stmt\"": "support.type.fragment.stmt", "fragment_specifier > \"tt\"": "support.type.fragment.tt", "fragment_specifier > \"ty\"": "support.type.fragment.ty", "token_repetition > \"$\",\ntoken_repetition_pattern > \"$\"": "support.repetiton.start", "token_repetition > \"*\",\ntoken_repetition_pattern > \"*\"": "support.repetiton.zero_or_more", "token_repetition > \"+\",\ntoken_repetition_pattern > \"+\"": "support.repetiton.one_or_more", "token_repetition > \"?\",\ntoken_repetition_pattern > \"?\"": "support.repetiton.zero_or_one", "identifier,\ncall_expression > identifier,\ncall_expression > field_expression > field_identifier,\ncall_expression > scoped_identifier > identifier:nth-child(2)": [ { "match": "^[A-Z]", "scopes": "entity.name.enum" } ], "generic_function > identifier,\ngeneric_function > field_expression > field_identifier,\ngeneric_function > scoped_identifier > identifier,\nfunction_item > identifier,\nfunction_signature_item > identifier,": [ { "match": "^[A-Z]", "scopes": "entity.name.enum" }, "entity.name.function" ], "call_expression > identifier,\ncall_expression > field_expression > field_identifier,\ncall_expression > scoped_identifier > identifier:nth-child(2),": [ { "match": "^[A-Z]", "scopes": "entity.name.enum" }, "entity.name.function.call" ], "use_list > self,\nscoped_use_list > self,\nscoped_identifier> self,\nuse_list > crate,\nscoped_use_list > crate,\nscoped_identifier> crate,\nuse_list > super,\nscoped_use_list > super,\nscoped_identifier> super": "keyword.control.crate", "use_wildcard > identifier:nth-child(0),\nuse_wildcard > scoped_identifier > identifier:nth-child(2),\nscoped_type_identifier > identifier:nth-child(0),\nscoped_type_identifier > scoped_identifier:nth-child(0) > identifier,\nscoped_identifier > identifier:nth-child(0),\nscoped_identifier > scoped_identifier:nth-child(0) > identifier,\nuse_declaration > identifier,\nuse_declaration > scoped_identifier > identifier,\nuse_as_clause > identifier,\nuse_as_clause > scoped_identifier > identifier,\nuse_list > identifier,\nuse_list > scoped_identifier > identifier,\nmeta_item > identifier, const_item > identifier, const_item > scoped_identifier > identifier": [ { "match": "^[A-Z\\d_]{1,}$", "scopes": "constant.other" }, { "match": "^[A-Z]", "scopes": "support.type" } ], "parameter > identifier,\nclosure_parameters > identifier,": "entity.name.variable.parameter", "lifetime": "entity.name.lifetime", "loop_label": "entity.name.loop-label", "self": "entity.name.variable.self", "closure_expression": "entity.name.closure", "remaining_field_pattern": "entity.name.match-remaining", "impl_item > \"!\"": "entity.other.trait-negation", "\"async\"": "storage.modifier.async", "\"let\"": "keyword.control.let", "\"const\"": "storage.modifier.const", "\"static\"": "storage.modifier.static", "\"extern\"": "storage.modifier.extern", "\"fn\"": "storage.modifier.fn", "\"type\"": "storage.modifier.type", "\"impl\"": "storage.modifier.impl", "\"dyn\"": "storage.modifier.dyn", "\"trait\"": "storage.modifier.trait", "\"mod\"": "storage.modifier.mod", "\"pub\"": "storage.modifier.pub", "\"crate\"": "storage.modifier.crate", "\"default\"": "storage.modifier.default", "\"struct\"": "storage.modifier.struct", "\"enum\"": "storage.modifier.enum", "\"union\"": "storage.modifier.union", "mutable_specifier": "storage.modifier.mut", "await_expression > \"await\"": "keyword.control.await", "\"unsafe\"": "keyword.control.unsafe", "\"use\"": "keyword.control.use", "\"match\"": "keyword.control.match", "\"if\"": "keyword.control.if", "\"in\"": "keyword.control.in", "\"else\"": "keyword.control.else", "\"move\"": "keyword.control.move", "\"while\"": "keyword.control.while", "\"loop\"": "keyword.control.loop", "\"for\"": "keyword.control.for", "\"return\"": "keyword.control.return", "\"continue\"": "keyword.control.continue", "\"break\"": "keyword.control.break", "\"where\"": "keyword.control.where", "\"ref\"": "keyword.control.ref", "\"macro_rules!\"": "keyword.control.macro-def", "closure_parameters > \"|\"": "keyword.control.closure-def", "\"as\"": "keyword.operator.as", "\":\"": "keyword.operator.constraint", "\"::\"": "keyword.operator.namespace", "\"=\"": "keyword.operator.assign", "captured_pattern > \"@\"": "keyword.operator.pattern-binding", "unary_expression > \"*\"": "keyword.operator.dereference", "unary_expression > \"!\"": "keyword.operator.not", "pointer_type > \"*\"": "keyword.operator.pointer", "removed_trait_bound > \"?\"": "keyword.operator.rm-trait-bound", "try_expression > \"?\"": "keyword.operator.error-propagation", "self_parameter > \"&\",\nreference_pattern > \"&\",\nreference_expression > \"&\",\nreference_type > \"&\"": "keyword.operator.reference", "binary_expression > \"+\",\nbinary_expression > \"-\",\nbinary_expression > \"/\",\nbinary_expression > \"*\",\nbinary_expression > \"%\",\nbinary_expression > \"<<\",\nbinary_expression > \">>\",": "keyword.operator.math", "compound_assignment_expr > \"+=\",\ncompound_assignment_expr > \"-=\",\ncompound_assignment_expr > \"/=\",\ncompound_assignment_expr > \"*=\",\ncompound_assignment_expr > \"%=\",\ncompound_assignment_expr > \"<<=\",\ncompound_assignment_expr > \">>=\",": "keyword.operator.math.assign", "binary_expression > \"&\",\nbinary_expression > \"|\",\nbinary_expression > \"^\",": "keyword.operator.logic.bitwise", "compound_assignment_expr > \"&=\",\ncompound_assignment_expr > \"|=\",\ncompound_assignment_expr > \"^=\",": "keyword.operator.logic.bitwise.assign", "binary_expression > \"<\",\nbinary_expression > \">\",\nbinary_expression > \"==\",\nbinary_expression > \"<=\",\nbinary_expression > \">=\",\nbinary_expression > \"!=\",": "keyword.operator.cmp", "binary_expression > \"&&\",\nbinary_expression > \"||\",": "keyword.operator.logic.boolean", "range_expression > \"..\",\nrange_expression > \"..=\",\nrange_expression > \"...\",": "keyword.operator.ranges", "match_arm > \"=>\"": "keyword.operator.match-arm", "macro_rule > \"=>\"": "keyword.operator.match-rule", "\"->\"": "keyword.operator.misc", "\"-\", \"/\", \"%\", \"<<\", \">>\", \"&&\", \"||\", \"<\", \">\", \"=>\",\n\"==\", \"<=\", \">=\", \"!=\", \"&\", \"|\", \"^\", \"..\", \"..=\", \"...\", \"->\",\".\"": "misc.other", "char_literal": "string.quoted.single", "string_literal": "string.quoted.double", "raw_string_literal": "string.quoted.other", "boolean_literal": "constant.language.boolean", "integer_literal": "constant.numeric.decimal", "float_literal": "constant.numeric.decimal", "escape_sequence": "constant.character.escape", "unary_expression > \"-\"": "constant.numeric.neg", "attribute_item, inner_attribute_item": "entity.attribute.name", "attribute_item> \"[\", attribute_item> \"]\", meta_arguments > \"(\", meta_arguments > \")\", meta_arguments > \",\"": "entity.attribute.name.punctuation" } }