heex.vim (1136B)
1 " Elixir filetype plugin 2 " Language: HEEx 3 " Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com> 4 " Last Change: 2022 Sep 21 5 " 2025 Apr 16 by Vim Project (set 'cpoptions' for line continuation, #17121) 6 " 2026 Jun 27 by Vim Project (add recommended style guard) 7 8 if exists("b:did_ftplugin") 9 finish 10 endif 11 let b:did_ftplugin = 1 12 13 let s:cpo_save = &cpo 14 set cpo&vim 15 16 if get(g:, 'heex_recommended_style', 17 \ get(g:, 'filetype_recommended_style', 1)) 18 setlocal shiftwidth=2 softtabstop=2 expandtab 19 endif 20 21 setlocal comments=:<%!-- 22 setlocal commentstring=<%!--\ %s\ --%> 23 24 let b:undo_ftplugin = 'set sw< sts< et< com< cms<' 25 26 " HTML: thanks to Johannes Zellner and Benji Fisher. 27 if exists("loaded_matchit") && !exists("b:match_words") 28 let b:match_ignorecase = 1 29 let b:match_words = '<%\{-}!--:--%\{-}>,' .. 30 \ '<:>,' .. 31 \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .. 32 \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .. 33 \ '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' 34 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" 35 endif 36 37 let &cpo = s:cpo_save 38 unlet s:cpo_save