mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 11:27:26 +10:00
vim-patch:421ed14: runtime(typst): add folding to typst ftplugin
closes: vim/vim#15897
421ed14b8a
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
This commit is contained in:
committed by
Christian Clason
parent
a6d1165771
commit
a25ec00f88
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Typst
|
||||
" Maintainer: Gregory Anders
|
||||
" Last Change: 2024 Oct 04
|
||||
" Last Change: 2024 Oct 21
|
||||
" Based on: https://github.com/kaarmu/typst.vim
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
@@ -21,6 +21,12 @@ if get(g:, 'typst_conceal', 0)
|
||||
let b:undo_ftplugin .= ' cole<'
|
||||
endif
|
||||
|
||||
if has("folding") && get(g:, 'typst_folding', 0)
|
||||
setlocal foldexpr=typst#foldexpr()
|
||||
setlocal foldmethod=expr
|
||||
let b:undo_ftplugin .= "|setl foldexpr< foldmethod<"
|
||||
endif
|
||||
|
||||
if !exists('current_compiler')
|
||||
compiler typst
|
||||
let b:undo_ftplugin ..= "| compiler make"
|
||||
|
||||
Reference in New Issue
Block a user