]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(typst): synchronize updates from the upstream typst.vim
authorYinzuo Jiang <jiangyinzuo@foxmail.com>
Sat, 2 Nov 2024 15:34:40 +0000 (16:34 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 2 Nov 2024 15:35:46 +0000 (16:35 +0100)
2 commits included from the upstream:

- https://github.com/kaarmu/typst.vim/commit/2a4a0e0662f2f882403af7200b4249c564a621ab
- https://github.com/kaarmu/typst.vim/commit/50e89f481102d5c9ef6990b9f8086c0c7d64bff6

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/typst.vim
runtime/syntax/typst.vim

index baf765a30bdf44179a6fbcc9cbb5f2e6a1dcaa8f..6d097dd922ee9fcfb47606465e70e8e248432821 100644 (file)
@@ -1,6 +1,6 @@
 " Language:    Typst
 " Maintainer:  Gregory Anders
-" Last Change: 2024 Oct 21
+" Last Change: 2024 Nov 02
 " Based on:    https://github.com/kaarmu/typst.vim
 
 function! typst#indentexpr() abort
@@ -18,6 +18,9 @@ function! typst#indentexpr() abort
     " Use last indent for block comments
     if l:synname == 'typstCommentBlock'
         return l:ind
+    " do not change the indents of bullet lists
+    elseif l:synname == 'typstMarkupBulletList'
+        return indent(a:lnum)
     endif
 
     if l:pline =~ '\v[{[(]\s*$'
index 82fdadb3d5aa5571f03c8c949d3d3ee18d652afe..dae14247802c46d99f756c47634a21ab0ade715f 100644 (file)
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:    Typst
 " Maintainer:  Gregory Anders <greg@gpanders.com>
-" Last Change: 2024-07-14
+" Last Change: 2024 Nov 02
 " Based on:    https://github.com/kaarmu/typst.vim
 
 if exists('b:current_syntax')
@@ -18,8 +18,8 @@ syntax cluster typstCommon
 " Common > Comment {{{2
 syntax cluster typstComment
     \ contains=typstCommentBlock,typstCommentLine
-syntax match typstCommentBlock
-    \ #/\*\%(\_.\{-}\)\*/#
+syntax region typstCommentBlock
+    \ start="/\*" end="\*/" keepend
     \ contains=typstCommentTodo,@Spell
 syntax match typstCommentLine
     \ #//.*#