aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/typst.vim5
-rw-r--r--runtime/syntax/typst.vim6
2 files changed, 7 insertions, 4 deletions
diff --git a/runtime/autoload/typst.vim b/runtime/autoload/typst.vim
index baf765a30b..6d097dd922 100644
--- a/runtime/autoload/typst.vim
+++ b/runtime/autoload/typst.vim
@@ -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*$'
diff --git a/runtime/syntax/typst.vim b/runtime/syntax/typst.vim
index 82fdadb3d5..dae1424780 100644
--- a/runtime/syntax/typst.vim
+++ b/runtime/syntax/typst.vim
@@ -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
\ #//.*#