diff --git a/grammars/rust.cson b/grammars/rust.cson index 7af0148..ce4e88a 100644 --- a/grammars/rust.cson +++ b/grammars/rust.cson @@ -145,6 +145,11 @@ 'type': { 'comment': 'A type' 'name': 'entity.name.type.rust' + 'match': '\\b([A-Z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b' + } + 'identifier': { + 'comment': 'Any identifier not otherwise specified' + 'name': 'variable.other.rust' 'match': '\\b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b' } 'type_params': { @@ -164,7 +169,7 @@ { 'include': '#std_types' } { 'include': '#std_traits' } { 'include': '#type_params' } - # { 'include': '#type' } + { 'include': '#type' } ] } } @@ -215,6 +220,7 @@ { 'include': '#block_comment' } { 'include': '#line_doc_comment' } { 'include': '#line_comment' } + { 'include': '#type' } ] } # Strings @@ -408,6 +414,8 @@ 'match': '\bfn\b' 'name': 'keyword.other.fn.rust' } + { 'include': '#type' } + { 'include': '#identifier' } ] } # Type declaration @@ -454,4 +462,6 @@ { 'include': '#type_params' } ] } + { 'include': '#type' } + { 'include': '#identifier' } ]