better vue syntax highlighting

This commit is contained in:
ManjaroOne666 2018-02-01 20:11:40 +00:00
parent 2875c26b9f
commit af596cd078
2 changed files with 15 additions and 3 deletions

View File

@ -249,6 +249,13 @@ hi! def link jsThis CRNoiseBrighter
hi! def link jsConditional CRAltDark
hi! def link jsParenRepeat CRAltBright
" vue definitions
hi! vueDirective ctermfg=88
hi! vueEvent ctermfg=160
hi! vueConditional ctermfg=202
hi! def link vueFor vueConditional
hi! vueRef ctermfg=214
" json definitions
hi! def link jsonKeyword Identifier
hi! def link jsonValue String
@ -326,8 +333,8 @@ if version >= 700
endif
hi VertSplit ctermfg=16 ctermbg=16 term=none cterm=none
hi Folded ctermfg=240 ctermbg=232 term=bold
hi FoldColumn ctermfg=237 ctermbg=none cterm=bold term=bold
hi Folded ctermfg=240 ctermbg=none term=bold
hi FoldColumn ctermfg=235 ctermbg=none cterm=bold term=bold
hi LineNr ctermfg=237 ctermbg=none cterm=none
hi CursorLineNr ctermfg=243 ctermbg=none cterm=none
hi EndOfBuffer ctermfg=233 ctermbg=none

View File

@ -56,6 +56,11 @@ endif
syn region vueSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
syn keyword htmlSpecialTagName contained template
syn keyword htmlArg contained scoped ts
syn match htmlArg "[@v:][-:.0-9_a-z]*\>" contained
" syn match htmlArg "[@v:][-:.0-9_a-z]*\>" contained
syn match vueDirective "[v:][-:.0-9_a-z]*" containedin=htmlTag
syn match vueEvent "[@][-:.0-9_a-z]*" containedin=htmlTag
syn match vueConditional "v-if\|v-else\|v-show" containedin=htmlTag
syn match vueFor "v-for" containedin=htmlTag
syn match vueRef "ref" containedin=htmlTag
let b:current_syntax = "vue"