mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-10-16 11:01:30 +08:00
feat: add vue directive syntax highlight
This commit is contained in:
1 parent
e8d14f8b9c
commit
b14869efd9
1 file changed
+32
@@ -0,0 +1,32 @@
|
||||
syntax match VueAttr '\v(\S)@<![v:\@][^\=]+(\=\"[^"]*\")?'
|
||||
\ containedin=htmlTag
|
||||
\ contains=VueKey,VueValue,VueInject
|
||||
|
||||
syntax match VueKey contained '\v[v:\@][^\=]+'
|
||||
syntax match VueValue contains=VueInject contained '\v\"\zs[^"]*\ze\"'
|
||||
syntax match VueInject contained '\v\$\w*'
|
||||
|
||||
syntax region VueExpression
|
||||
\ containedin=vueTemplate,vueValue,htmlString
|
||||
\ matchgroup=VueBrace
|
||||
\ start="{{"
|
||||
\ end="}}"
|
||||
|
||||
syntax region VueExpression
|
||||
\ containedin=htmlItalic
|
||||
\ matchgroup=VueBrace
|
||||
\ transparent
|
||||
\ start="{{"
|
||||
\ end="}}"
|
||||
|
||||
" Wepy directive syntax
|
||||
syntax match VueAttr '\v(\S)@<!wx[^\=]+(\=\"[^"]*\")?'
|
||||
\ containedin=htmlTag
|
||||
\ contains=VueKey,VueValue,VueInject
|
||||
|
||||
syntax match VueKey contained '\vwx[^\=]+'
|
||||
|
||||
highlight link VueAttr Comment
|
||||
highlight link VueKey PreProc
|
||||
highlight link VueInject Constant
|
||||
highlight link VueBrace PreProc
|
||||
Reference in new issue
Block a user