Deprecate g:vue_disable_pre_processors

It was superseded by g:vue_pre_processors (#133)

I could add a message if g:vue_disable_pre_processors is set, asking
people to update their config to the new variable, but I'd rather not
interrupt people's workflows.
This commit is contained in:
Adriaan Zonnenberg
2019-07-24 20:57:50 +02:00
parent 6acff7e6db
commit 18c4211bd6
2 changed files with 17 additions and 14 deletions

View File

@@ -6,6 +6,11 @@ if exists("b:current_syntax")
finish
endif
" Convert deprecated variable to new one
if exists('g:vue_disable_pre_processors') && g:vue_disable_pre_processors
let g:vue_pre_processors = []
endif
runtime! syntax/html.vim
syntax clear htmlTagName
syntax match htmlTagName contained "\<[a-zA-Z0-9:-]*\>"
@@ -59,20 +64,18 @@ for item in s:language_config
let s:language_dict[item.lang] = item.args
endfor
if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
if exists("g:vue_pre_processors")
let pre_processors = g:vue_pre_processors
else
let pre_processors = map(copy(s:language_config), {k, v -> v.lang})
endif
for language in pre_processors
if has_key(s:language_dict, language)
call call("s:register_language", get(s:language_dict, language))
endif
endfor
if exists("g:vue_pre_processors")
let pre_processors = g:vue_pre_processors
else
let pre_processors = map(copy(s:language_config), {k, v -> v.lang})
endif
for language in pre_processors
if has_key(s:language_dict, language)
call call("s:register_language", get(s:language_dict, language))
endif
endfor
syn region vueSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
syn keyword htmlSpecialTagName contained template
syn keyword htmlArg contained scoped ts