blob: fba8083717d18cc5f8804387b3bf9975ca6635c3 [file] [log] [blame]
Gregory Anders1cc4cae2024-07-15 20:00:48 +02001" Vim filetype plugin file
2" Language: Typst
3" Maintainer: Gregory Anders
4" Last Change: 2024-07-14
5" Based on: https://github.com/kaarmu/typst.vim
Riley Bruinsc3d5c2f2024-05-20 05:08:49 -07006
7if exists('b:did_ftplugin')
8 finish
9endif
10let b:did_ftplugin = 1
11
Gregory Anders1cc4cae2024-07-15 20:00:48 +020012compiler typst
Riley Bruinsc3d5c2f2024-05-20 05:08:49 -070013
Gregory Anders1cc4cae2024-07-15 20:00:48 +020014setlocal commentstring=//\ %s
15setlocal comments=s1:/*,mb:*,ex:*/,://
16setlocal formatoptions+=croq
17setlocal suffixesadd=.typ
18
19let b:undo_ftplugin = 'setl cms< com< fo< sua<'
20
21if get(g:, 'typst_conceal', 0)
22 setlocal conceallevel=2
23 let b:undo_ftplugin .= ' cole<'
24endif