diff --git a/syntax/vue.vim b/syntax/vue.vim index 5b0bbcf..7010ae7 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -24,6 +24,8 @@ let s:use_less = exists("g:vim_vue_plugin_use_less") \ && g:vim_vue_plugin_use_less == 1 let s:use_sass = exists("g:vim_vue_plugin_use_sass") \ && g:vim_vue_plugin_use_sass == 1 +let s:use_coffee = exists("g:vim_vue_plugin_use_coffee") + \ && g:vim_vue_plugin_use_coffee == 1 "}}} """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -88,14 +90,20 @@ if s:use_pug call s:LoadFullSyntax('@PugSyntax', 'pug') endif +" If less is enabled, load less syntax +if s:use_less + call s:LoadSyntax('@LessSyntax', 'less') +endif + " If sass is enabled, load sass syntax if s:use_sass call s:LoadSyntax('@SassSyntax', 'sass') endif -" If less is enabled, load less syntax -if s:use_less - call s:LoadSyntax('@LessSyntax', 'less') +" If CoffeeScript is enabled, load the syntax. Keep name consistent with +" vim-coffee-script/after/html.vim +if s:use_coffee + call s:LoadFullSyntax('@htmlCoffeeScript', 'coffee') endif "}}} @@ -140,7 +148,7 @@ syntax match htmlArg '\v' containedin=@HTMLSyntax " Syntax highlight {{{ " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" All start with html/javascript/css for emmet-vim type detection +" All start with html/javascript/css for emmet-vim in-file type detection syntax region htmlVueTemplate fold \ start=++ \ end=+^+ @@ -160,6 +168,10 @@ syntax region javascriptVueScript fold \ start=++ \ end=++ \ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag +syntax region coffeeVueScript fold + \ start=++ + \ keepend contains=@htmlCoffeeScript,jsImport,jsExport,vueTag syntax region cssVueStyle fold \ start=++