mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-10 22:51:52 +08:00
Add syntax sync settings for long files to fix syntx issues
This commit is contained in:
@@ -153,6 +153,7 @@ syntax region javascriptVueScript fold
|
|||||||
\ end=+</script>+
|
\ end=+</script>+
|
||||||
\ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag
|
\ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag
|
||||||
|
|
||||||
|
|
||||||
syntax region cssVueStyle fold
|
syntax region cssVueStyle fold
|
||||||
\ start=+<style[^>]*>+
|
\ start=+<style[^>]*>+
|
||||||
\ end=+</style>+
|
\ end=+</style>+
|
||||||
@@ -170,7 +171,7 @@ syntax region coffeeVueScript fold
|
|||||||
\ keepend contains=@htmlCoffeeScript,jsImport,jsExport,vueTag
|
\ keepend contains=@htmlCoffeeScript,jsImport,jsExport,vueTag
|
||||||
|
|
||||||
syntax region typescriptVueScript fold
|
syntax region typescriptVueScript fold
|
||||||
\ start=+<script[^>]*lang="ts"[^>]*>+
|
\ start=+<script[^>]*lang=["']ts["'][^>]*>+
|
||||||
\ end=+</script>+
|
\ end=+</script>+
|
||||||
\ keepend contains=@TypeScript,vueTag
|
\ keepend contains=@TypeScript,vueTag
|
||||||
|
|
||||||
@@ -192,11 +193,12 @@ syntax region vueTag fold
|
|||||||
\ contained contains=htmlTagN,htmlString,htmlArg
|
\ contained contains=htmlTagN,htmlString,htmlArg
|
||||||
syntax region vueTag
|
syntax region vueTag
|
||||||
\ start=+^</+ end=+>+
|
\ start=+^</+ end=+>+
|
||||||
\ contained contains=htmlTagN,htmlString,htmlArg
|
\ contains=htmlTagN,htmlString,htmlArg
|
||||||
|
|
||||||
highlight default link vueTag htmlTag
|
highlight default link vueTag htmlTag
|
||||||
highlight default link cssUnitDecorators2 Number
|
highlight default link cssUnitDecorators2 Number
|
||||||
highlight default link cssKeyFrameProp2 Constant
|
highlight default link cssKeyFrameProp2 Constant
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@@ -264,5 +266,25 @@ silent! syntax clear htmlHead
|
|||||||
syntax match htmlArg '\v<data(-[.a-z0-9]+)+>' containedin=@HTMLSyntax
|
syntax match htmlArg '\v<data(-[.a-z0-9]+)+>' containedin=@HTMLSyntax
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
"
|
||||||
|
" Syntax sync {{{
|
||||||
|
"
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
syntax sync clear
|
||||||
|
syntax sync minlines=10
|
||||||
|
syntax sync match vueHighlight groupthere NONE "</\(script\|template\|style\)"
|
||||||
|
syntax sync match scriptHighlight groupthere javascriptVueScript "<script"
|
||||||
|
syntax sync match scriptHighlight groupthere coffeeVueScript "<script[^>]*lang=["']coffee["'][^>]*>"
|
||||||
|
syntax sync match scriptHighlight groupthere typescriptVueScript "<script[^>]*lang=["']ts["'][^>]*>"
|
||||||
|
syntax sync match templateHighlight groupthere htmlVueTemplate "<template"
|
||||||
|
syntax sync match templateHighlight groupthere pugVueTemplate "<template[^>]*lang=["']pug["'][^>]*>"
|
||||||
|
syntax sync match styleHighlight groupthere cssVueStyle "<style"
|
||||||
|
syntax sync match styleHighlight groupthere cssLessVueStyle "<style[^>]*lang=["']less["'][^>]*>"
|
||||||
|
syntax sync match styleHighlight groupthere cssSassVueStyle "<style[^>]*lang=["']sass["'][^>]*>"
|
||||||
|
syntax sync match styleHighlight groupthere cssScssVueStyle "<style[^>]*lang=["']scss["'][^>]*>"
|
||||||
|
"}}}
|
||||||
|
|
||||||
let b:current_syntax = 'vue'
|
let b:current_syntax = 'vue'
|
||||||
" vim: fdm=marker
|
" vim: fdm=marker
|
||||||
|
|||||||
Reference in New Issue
Block a user