mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:d181baf: runtime(typst): synchronize updates from the upstream typst.vim
2 commits included from the upstream: -2a4a0e0662
-50e89f4811
d181bafd0b
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
This commit is contained in:
parent
86e54734bf
commit
f5933d196b
@ -1,6 +1,6 @@
|
|||||||
" Language: Typst
|
" Language: Typst
|
||||||
" Maintainer: Gregory Anders
|
" Maintainer: Gregory Anders
|
||||||
" Last Change: 2024 Oct 21
|
" Last Change: 2024 Nov 02
|
||||||
" Based on: https://github.com/kaarmu/typst.vim
|
" Based on: https://github.com/kaarmu/typst.vim
|
||||||
|
|
||||||
function! typst#indentexpr() abort
|
function! typst#indentexpr() abort
|
||||||
@ -18,6 +18,9 @@ function! typst#indentexpr() abort
|
|||||||
" Use last indent for block comments
|
" Use last indent for block comments
|
||||||
if l:synname == 'typstCommentBlock'
|
if l:synname == 'typstCommentBlock'
|
||||||
return l:ind
|
return l:ind
|
||||||
|
" do not change the indents of bullet lists
|
||||||
|
elseif l:synname == 'typstMarkupBulletList'
|
||||||
|
return indent(a:lnum)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if l:pline =~ '\v[{[(]\s*$'
|
if l:pline =~ '\v[{[(]\s*$'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Typst
|
" Language: Typst
|
||||||
" Maintainer: Gregory Anders <greg@gpanders.com>
|
" Maintainer: Gregory Anders <greg@gpanders.com>
|
||||||
" Last Change: 2024-07-14
|
" Last Change: 2024 Nov 02
|
||||||
" Based on: https://github.com/kaarmu/typst.vim
|
" Based on: https://github.com/kaarmu/typst.vim
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
@ -18,8 +18,8 @@ syntax cluster typstCommon
|
|||||||
" Common > Comment {{{2
|
" Common > Comment {{{2
|
||||||
syntax cluster typstComment
|
syntax cluster typstComment
|
||||||
\ contains=typstCommentBlock,typstCommentLine
|
\ contains=typstCommentBlock,typstCommentLine
|
||||||
syntax match typstCommentBlock
|
syntax region typstCommentBlock
|
||||||
\ #/\*\%(\_.\{-}\)\*/#
|
\ start="/\*" end="\*/" keepend
|
||||||
\ contains=typstCommentTodo,@Spell
|
\ contains=typstCommentTodo,@Spell
|
||||||
syntax match typstCommentLine
|
syntax match typstCommentLine
|
||||||
\ #//.*#
|
\ #//.*#
|
||||||
|
Loading…
Reference in New Issue
Block a user