diff --git a/syntaxes/wit.tmLanguage.json b/syntaxes/wit.tmLanguage.json index fa0634e..016d2c4 100644 --- a/syntaxes/wit.tmLanguage.json +++ b/syntaxes/wit.tmLanguage.json @@ -15,6 +15,9 @@ { "include": "#package" }, + { + "include": "#toplevel-use" + }, { "include": "#world" }, @@ -163,10 +166,10 @@ ] }, "5": { - "name": "keyword.operator.version.package-identifier.wit" + "name": "keyword.operator.versioning.package-identifier.wit" }, "6": { - "name": "variable.other.constant.version.package-identifier.wit" + "name": "constant.numeric.versioning.package-identifier.wit" } } } @@ -174,6 +177,42 @@ } } }, + "toplevel-use": { + "name": "meta.toplevel-use-item.wit", + "match": "\\s*(use)\\s+([^\\s]+)(\\s+(as)\\s+([^\\s]+))?\\s*", + "captures": { + "1": { + "name": "keyword.other.use.toplevel-use-item.wit" + }, + "2": { + "name": "meta.interface.toplevel-use-item.wit", + "patterns": [ + { + "name": "entity.name.type.declaration.interface.toplevel-use-item.wit", + "match": "\\b((?