From 9f77f09aacd1fb0fd6138a6d16ed2755f6bfae3f Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Sat, 29 May 2021 12:25:10 +0200 Subject: Parse import and include expressions Co-Authored-By: Laurenz --- tools/support/typst.tmLanguage.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/support/typst.tmLanguage.json b/tools/support/typst.tmLanguage.json index 58c9f893..3375a07d 100644 --- a/tools/support/typst.tmLanguage.json +++ b/tools/support/typst.tmLanguage.json @@ -119,7 +119,7 @@ }, { "name": "keyword.other.typst", - "match": "(#)(from|in)\\b", + "match": "(#)(in|using|as)\\b", "captures": { "1": { "name": "punctuation.definition.keyword.typst" } } }, { @@ -159,6 +159,15 @@ }, "patterns": [{ "include": "#code" }] }, + { + "begin": "(#)include\\b", + "end": "\n|(?=])", + "beginCaptures": { + "0": { "name": "keyword.control.include.typst" }, + "1": { "name": "punctuation.definition.keyword.typst" } + }, + "patterns": [{ "include": "#code" }] + }, { "comment": "Function name", "name": "entity.name.function.typst", @@ -216,7 +225,7 @@ }, { "name": "keyword.other.typst", - "match": "\\b(pub|let|import|from)\\b" + "match": "\\b(pub|let|import|include|using|as)\\b" }, { "include": "#constants" }, { -- cgit v1.2.3