mirror of
https://github.com/posva/vim-vue.git
synced 2025-12-07 01:54:27 +08:00
Fix #68 - change load order of syntax files
I'm not sure what's the root cause of this, but this seems to work.
This commit is contained in:
@@ -43,6 +43,7 @@ function! s:register_language(language, tag, ...)
|
||||
endfunction
|
||||
|
||||
if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
|
||||
call s:register_language('less', 'style')
|
||||
call s:register_language('pug', 'template', s:attr('lang', '\%(pug\|jade\)'))
|
||||
call s:register_language('slm', 'template')
|
||||
call s:register_language('handlebars', 'template')
|
||||
@@ -52,7 +53,6 @@ if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
|
||||
call s:register_language('stylus', 'style')
|
||||
call s:register_language('sass', 'style')
|
||||
call s:register_language('scss', 'style')
|
||||
call s:register_language('less', 'style')
|
||||
endif
|
||||
|
||||
syn region vueSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
|
||||
@@ -90,10 +90,15 @@ Execute:
|
||||
Given vue (SCSS region):
|
||||
<style lang="scss">
|
||||
$green: #42b983;
|
||||
|
||||
button {
|
||||
background-color: $green;
|
||||
}
|
||||
</style>
|
||||
|
||||
Execute:
|
||||
AssertEqual 'scssVariable', SyntaxAt(2, 1)
|
||||
AssertEqual 'scssVariable', SyntaxOf('$green', 1)
|
||||
AssertEqual 'scssVariable', SyntaxOf('$green', 2)
|
||||
AssertEqual 'vueSurroundingTag', SyntaxAt(1, 1)
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user