mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 21:54:46 +08:00
fix: highlight for vue tag
This commit is contained in:
@@ -18,14 +18,12 @@ syn include @CSSSyntax syntax/css.vim
|
|||||||
let b:current_syntax='vue'
|
let b:current_syntax='vue'
|
||||||
|
|
||||||
" Find tag <script> / <style> and enable javascript / css syntax
|
" Find tag <script> / <style> and enable javascript / css syntax
|
||||||
syn region vueTemplate start=+<template\(\s.\{-}\)\?>+ end=+</template>+ keepend contains=@HTMLSyntax
|
syn region vueTemplate start=+<template\(\s.\{-}\)\?>+ end=+</template>+ keepend contains=@HTMLSyntax,vueTag
|
||||||
syn region vueScript start=+<script\(\s.\{-}\)\?>+ end=+</script>+ keepend contains=@jsAll,jsImport,jsExport
|
syn region vueScript start=+<script\(\s.\{-}\)\?>+ end=+</script>+ keepend contains=@jsAll,jsImport,jsExport,vueTag
|
||||||
syn region vueStyle start=+<style\(\s.\{-}\)\?>+ end=+</style>+ keepend contains=@CSSSyntax,@HTMLSyntax
|
syn region vueStyle start=+<style\(\s.\{-}\)\?>+ end=+</style>+ keepend contains=@CSSSyntax,@HTMLSyntax,vueTag
|
||||||
|
|
||||||
hi def link vueTag htmlTagName
|
hi def link vueTag htmlTagName
|
||||||
hi! link vueTemplate vueTag
|
syn match vueTag /\v(tempalte|script|style)/
|
||||||
hi! link vueScript vueTag
|
|
||||||
hi! link vueStyle vueTag
|
|
||||||
|
|
||||||
" Officially, vim-jsx depends on the pangloss/vim-javascript syntax package
|
" Officially, vim-jsx depends on the pangloss/vim-javascript syntax package
|
||||||
" (and is tested against it exclusively). However, in practice, we make some
|
" (and is tested against it exclusively). However, in practice, we make some
|
||||||
|
|||||||
Reference in New Issue
Block a user