mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-09 22:25:12 +08:00
feat: support less syntax from origin or vim-less
This commit is contained in:
@@ -19,6 +19,7 @@ function! s:LoadFullSyntax(group, type)
|
|||||||
exec 'syn include '.a:group.' syntax/'.a:type.'.vim'
|
exec 'syn include '.a:group.' syntax/'.a:type.'.vim'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
" Load syntax/*.vim to syntax group
|
" Load syntax/*.vim to syntax group
|
||||||
if exists("g:vim_vue_plugin_load_full_syntax")
|
if exists("g:vim_vue_plugin_load_full_syntax")
|
||||||
\ && g:vim_vue_plugin_load_full_syntax == 1
|
\ && g:vim_vue_plugin_load_full_syntax == 1
|
||||||
@@ -48,6 +49,13 @@ endif
|
|||||||
if exists("g:vim_vue_plugin_use_less")
|
if exists("g:vim_vue_plugin_use_less")
|
||||||
\ && g:vim_vue_plugin_use_less == 1
|
\ && g:vim_vue_plugin_use_less == 1
|
||||||
call s:LoadFullSyntax('@LessSyntax', 'less')
|
call s:LoadFullSyntax('@LessSyntax', 'less')
|
||||||
|
syn clear cssDefinition
|
||||||
|
syn region lessDefinition
|
||||||
|
\ matchgroup=cssBraces
|
||||||
|
\ contains=@LessSyntax
|
||||||
|
\ start="{"
|
||||||
|
\ end="}"
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = 'vue'
|
let b:current_syntax = 'vue'
|
||||||
|
|||||||
Reference in New Issue
Block a user