mirror of
https://github.com/posva/vim-vue.git
synced 2025-12-08 18:34:45 +08:00
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:
@@ -119,8 +119,8 @@ When checking for pre-processor languages, multiple syntax highlighting checks a
|
||||
let g:vue_pre_processors = ['pug', 'scss']
|
||||
```
|
||||
|
||||
Or alternatively, disable pre-processor languages altogether:
|
||||
To disable pre-processor languages altogether (only highlight HTML, JavaScript, and CSS):
|
||||
|
||||
```vim
|
||||
let g:vue_disable_pre_processors = 1
|
||||
let g:vue_pre_processors = []
|
||||
```
|
||||
|
||||
@@ -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,7 +64,6 @@ 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
|
||||
@@ -71,7 +75,6 @@ if !exists("g:vue_disable_pre_processors") || !g:vue_disable_pre_processors
|
||||
call call("s:register_language", get(s:language_dict, language))
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
syn region vueSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
syn keyword htmlSpecialTagName contained template
|
||||
|
||||
Reference in New Issue
Block a user