mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-11-02 02:17:33 +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
@@ -13,3 +13,28 @@ let g:vim_vue_plugin_config = {
|
||||
\'foldexpr': 1,
|
||||
\'full_syntax': ['scss', 'less'],
|
||||
\}
|
||||
|
||||
" Block tag, syntax by lang="..." or the first in config, and block group
|
||||
" with css prefix for emmet-vim
|
||||
function! Check()
|
||||
call ExpectBlock('div.set', 'template', 'pug', 'pugTemplateBlock')
|
||||
call ExpectBlock('<template></template>', 'template', 'html', 'htmlTemplateBlock')
|
||||
call ExpectBlock('export default', 'script', 'javascript', 'javascriptScriptBlock')
|
||||
call ExpectBlock('import Vue', 'script', 'typescript', 'typescriptScriptBlock')
|
||||
call ExpectBlock('# Assignment', 'script', 'coffee', 'coffeeScriptBlock')
|
||||
call ExpectBlock('p {', 'style', 'css', 'cssStyleBlock')
|
||||
call ExpectBlock('$a: 100px', 'style', 'scss', 'cssScssStyleBlock')
|
||||
call ExpectBlock('$w: 128px', 'style', 'sass', 'sassStyleBlock')
|
||||
call ExpectBlock('@list: 10 12', 'style', 'less', 'cssLessStyleBlock')
|
||||
call ExpectBlock("@import 'vendor'", 'style', 'stylus', 'cssStylusStyleBlock')
|
||||
call ExpectBlock('"requiresAuth"', 'route', 'json', 'jsonRouteBlock')
|
||||
call ExpectBlock('# This is', 'docs', 'markdown', 'markdownDocsBlock')
|
||||
call ExpectBlock('en:', 'i18n', 'yaml', 'yamlI18nBlock')
|
||||
call ExpectBlock('"en"', 'i18n', 'json', 'jsonI18nBlock')
|
||||
|
||||
" Syntax from a sync point, as after jumping to the end
|
||||
silent edit!
|
||||
normal! G
|
||||
call search('"en"', 'bW')
|
||||
call ExpectEqual(GetVueSyntax(), 'json', 'syntax at the end after reload')
|
||||
endfunction
|
||||
Reference in new issue
Block a user