From 0de0dc7579bc1a06aff719c0c5f79748e9e58745 Mon Sep 17 00:00:00 2001 From: Kaj Munhoz Arfvidsson Date: Mon, 11 Dec 2023 22:02:25 +0100 Subject: [PATCH] Closes #75. --- syntax/typst.vim | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/syntax/typst.vim b/syntax/typst.vim index a6bf780..c936831 100644 --- a/syntax/typst.vim +++ b/syntax/typst.vim @@ -58,9 +58,15 @@ syntax region typstCodeStatement \ matchgroup=Noise end=/\v%(;|$)/ \ contains=@typstCode syntax region typstCodeStatement - \ matchgroup=typstCodeStatementWord start=/show/ + \ contained + \ matchgroup=typstCodeStatementWord start=/show/ \ matchgroup=Noise end=/\v%(:|$)/ keepend - \ contains=@typstCode + \ contains=@typstCode + \ skipwhite nextgroup=@typstCode,typstCodeShowRocket +syntax match typstCodeShowRocket + \ contained + \ /.*=>/ + \ contains=@typstCode \ skipwhite nextgroup=@typstCode " Code > Identifiers {{{2 @@ -190,7 +196,7 @@ syntax region typstHashtagStatement \ matchgroup=typstHashtagStatementWord start=/#show/ \ matchgroup=Noise end=/\v%(:|$)/ keepend \ contains=@typstCode - \ skipwhite nextgroup=@typstCode + \ skipwhite nextgroup=@typstCode,typstCodeShowRocket " Hashtag > Constants {{{2 syntax cluster typstHashtagConstants