mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-09 06:04: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'
|
||||
|
||||
" Find tag <script> / <style> and enable javascript / css syntax
|
||||
syn region vueTemplate start=+<template\(\s.\{-}\)\?>+ end=+</template>+ keepend contains=@HTMLSyntax
|
||||
syn region vueScript start=+<script\(\s.\{-}\)\?>+ end=+</script>+ keepend contains=@jsAll,jsImport,jsExport
|
||||
syn region vueStyle start=+<style\(\s.\{-}\)\?>+ end=+</style>+ keepend contains=@CSSSyntax,@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,vueTag
|
||||
syn region vueStyle start=+<style\(\s.\{-}\)\?>+ end=+</style>+ keepend contains=@CSSSyntax,@HTMLSyntax,vueTag
|
||||
|
||||
hi def link vueTag htmlTagName
|
||||
hi! link vueTemplate vueTag
|
||||
hi! link vueScript vueTag
|
||||
hi! link vueStyle vueTag
|
||||
syn match vueTag /\v(tempalte|script|style)/
|
||||
|
||||
" Officially, vim-jsx depends on the pangloss/vim-javascript syntax package
|
||||
" (and is tested against it exclusively). However, in practice, we make some
|
||||
|
||||
Reference in New Issue
Block a user