mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-11-01 18:12:19 +08:00
Add cases for attribute highlight on and off, block syntax by lang and emmet-vim group names, OnChangeVueSyntax(), matchit, .wpy, initial_indent as syntax and tag.syntax, and syntax after reloading. Also check indenting a file after removing all indent with g:test_flatten, which fails before the end tag fix as closing tags at column 0 were taken as block end tags.
This commit is contained in:
23 files changed
+281
-15
No files matched your search
@@ -0,0 +1,26 @@
|
||||
" Template syntax with attribute highlight
|
||||
let g:vim_vue_plugin_config = {'attribute': 1}
|
||||
let g:test_flatten = 1
|
||||
|
||||
function! Check()
|
||||
" Directives
|
||||
call ExpectSyntax(':class', 'VueKey')
|
||||
call ExpectSyntax('@click', 'VueKey')
|
||||
call ExpectSyntax('v-if', 'VueKey')
|
||||
" Values as expressions
|
||||
call ExpectSyntax('1"', 'javaScriptNumber')
|
||||
call ExpectSyntax('$t', 'VueInject')
|
||||
call ExpectSyntax("'title'", 'javaScriptStringS')
|
||||
" Components and attributes
|
||||
normal! gg
|
||||
call ExpectSyntax('MyComponent', 'VueComponentName')
|
||||
call ExpectSyntax('ref=', 'htmlArg')
|
||||
call ExpectSyntax('data-id', 'htmlArg')
|
||||
call ExpectSyntax('my-component', 'VueComponentName')
|
||||
call ExpectSyntax('transition', 'VueComponentName')
|
||||
" Interpolation
|
||||
call ExpectSyntax('{{', 'VueBrace')
|
||||
call ExpectSyntax('message', 'VueExpression')
|
||||
call ExpectEqual(matchstr(execute('highlight VueKey'), 'links to \zs\S\+'),
|
||||
\ 'Type', 'VueKey link')
|
||||
endfunction
|
||||
Reference in new issue
Block a user