Support style v-bind syntax

This commit is contained in:
leafOfTree
2021-08-11 18:32:10 +08:00
parent e4ddccee90
commit eb3bba0ccb

View File

@@ -155,6 +155,11 @@ function! s:SetBlockSyntax(config_syntax)
endfor
endfunction
function! s:HighlightVue()
call s:HighlightVueTag()
call s:HighlightVueStyle()
endfunction
function! s:HighlightVueTag()
syntax region vueTag fold
\ start=+^<[^/]+ end=+>+ skip=+></+
@@ -169,6 +174,11 @@ function! s:HighlightVueTag()
highlight default link vueTagOneline htmlTag
endfunction
function! s:HighlightVueStyle()
syntax keyword cssPseudoClassId contained deep slotted global
syntax region cssFunction contained matchgroup=cssFunctionName start="\<\(v-bind\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline
endfunction
function! s:SetIsKeyword()
if has("patch-7.4-1142")
if has("win32")
@@ -187,7 +197,7 @@ function! VimVuePluginSyntaxMain(...)
let syntax_list = vue#GetSyntaxList(s:config_syntax)
call s:LoadSyntaxList(syntax_list)
call s:SetIsKeyword()
call s:HighlightVueTag()
call s:HighlightVue()
endfunction
let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test