From fcf32b82197f6aa096fb8b5bb93693ff9d5f0d8c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 11 Sep 2026 08:57:56 +0800 Subject: [PATCH] vim-patch:36d01cf: runtime(typst): do not highlight code blocks and raw text Similar to markdown syntax, by default do not highlight raw and code blocks. Syntax highlighting groups are still in place so it is possible for users to add their own if needed. - typstMarkupRawInline - typstMarkupRawBlock closes: vim/vim#21260 https://github.com/vim/vim/commit/36d01cff54addfe5352221bd39bff1d91af88623 Co-authored-by: Maxim Kim --- runtime/syntax/typst.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/runtime/syntax/typst.vim b/runtime/syntax/typst.vim index 220544c059..af202eb0c9 100644 --- a/runtime/syntax/typst.vim +++ b/runtime/syntax/typst.vim @@ -1,7 +1,7 @@ " Vim syntax file " Maintainer: Maxim Kim " Language: Typst -" Last Change: 2026 Jun 30 +" Last Change: 2026 Sep 10 " Based on the syntax file from https://github.com/kaarmu/typst.vim if exists('b:current_syntax') @@ -175,8 +175,8 @@ for s:name in get(g:, 'typst_embedded_languages', []) let s:rule = ['syn region' \ ,"typstMarkupRawBlock_"..s:name \ ,'matchgroup=typstMarkupRawDelimiter' - \ ,'start=/```'..s:name..'\>/ end=/```/' - \ ,'contains=@typstEmbedded_'..s:name + \ ,'start=/```'..s:name..'\>/ end=/```/' + \ ,'contains=@typstEmbedded_'..s:name \ ,'keepend' \ ,'concealends'] @@ -303,9 +303,7 @@ hi def link typstExprNumberType Constant hi def link typstExprString String hi def link typstExprLabel Structure -hi def link typstMarkupRawInline PreProc hi def link typstMarkupRawDelimiter Special -hi def link typstMarkupRawBlock PreProc hi def link typstMarkupDollar Special hi def link typstMarkupLabel PreProc hi def link typstMarkupReference Special