mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-03-01 12:57:01 +08:00
feat: support vim-emmet JavaScript filetype
This commit is contained in:
@@ -185,7 +185,7 @@ function! s:SynCSS(syn)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:SynVueScriptOrStyle(syn)
|
function! s:SynVueScriptOrStyle(syn)
|
||||||
return a:syn =~? '\v(vueStyle)|(vueScript)'
|
return a:syn =~? '\v(VueStyle)|(VueScript)'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:PrevMultilineEmptyTag(lnum)
|
function! s:PrevMultilineEmptyTag(lnum)
|
||||||
@@ -217,9 +217,9 @@ function! GetVueTag()
|
|||||||
|
|
||||||
if first_syn =~ '.*VueTemplate'
|
if first_syn =~ '.*VueTemplate'
|
||||||
let tag = 'template'
|
let tag = 'template'
|
||||||
elseif first_syn =~ 'vueScript.*'
|
elseif first_syn =~ '.*VueScript'
|
||||||
let tag = 'script'
|
let tag = 'script'
|
||||||
elseif first_syn =~ '.*vueStyle'
|
elseif first_syn =~ '.*VueStyle'
|
||||||
let tag = 'style'
|
let tag = 'style'
|
||||||
else
|
else
|
||||||
let tag = ''
|
let tag = ''
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ syntax region pugVueTemplate
|
|||||||
\ end=+</template>+
|
\ end=+</template>+
|
||||||
\ keepend contains=@PugSyntax,vueTag
|
\ keepend contains=@PugSyntax,vueTag
|
||||||
|
|
||||||
syntax region vueScript
|
syntax region javascriptVueScript
|
||||||
\ start=+<script\(\s.\{-}\)\?>+
|
\ start=+<script\(\s.\{-}\)\?>+
|
||||||
\ end=+</script>+
|
\ end=+</script>+
|
||||||
\ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag
|
\ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag
|
||||||
|
|||||||
Reference in New Issue
Block a user