mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-10 14:41:52 +08:00
Support coffee syntax
This commit is contained in:
@@ -24,6 +24,8 @@ let s:use_less = exists("g:vim_vue_plugin_use_less")
|
|||||||
\ && g:vim_vue_plugin_use_less == 1
|
\ && g:vim_vue_plugin_use_less == 1
|
||||||
let s:use_sass = exists("g:vim_vue_plugin_use_sass")
|
let s:use_sass = exists("g:vim_vue_plugin_use_sass")
|
||||||
\ && g:vim_vue_plugin_use_sass == 1
|
\ && g:vim_vue_plugin_use_sass == 1
|
||||||
|
let s:use_coffee = exists("g:vim_vue_plugin_use_coffee")
|
||||||
|
\ && g:vim_vue_plugin_use_coffee == 1
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@@ -88,14 +90,20 @@ if s:use_pug
|
|||||||
call s:LoadFullSyntax('@PugSyntax', 'pug')
|
call s:LoadFullSyntax('@PugSyntax', 'pug')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" If less is enabled, load less syntax
|
||||||
|
if s:use_less
|
||||||
|
call s:LoadSyntax('@LessSyntax', 'less')
|
||||||
|
endif
|
||||||
|
|
||||||
" If sass is enabled, load sass syntax
|
" If sass is enabled, load sass syntax
|
||||||
if s:use_sass
|
if s:use_sass
|
||||||
call s:LoadSyntax('@SassSyntax', 'sass')
|
call s:LoadSyntax('@SassSyntax', 'sass')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" If less is enabled, load less syntax
|
" If CoffeeScript is enabled, load the syntax. Keep name consistent with
|
||||||
if s:use_less
|
" vim-coffee-script/after/html.vim
|
||||||
call s:LoadSyntax('@LessSyntax', 'less')
|
if s:use_coffee
|
||||||
|
call s:LoadFullSyntax('@htmlCoffeeScript', 'coffee')
|
||||||
endif
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
@@ -140,7 +148,7 @@ syntax match htmlArg '\v<data(-[.a-z0-9]+)+>' containedin=@HTMLSyntax
|
|||||||
" Syntax highlight {{{
|
" Syntax highlight {{{
|
||||||
"
|
"
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" All start with html/javascript/css for emmet-vim type detection
|
" All start with html/javascript/css for emmet-vim in-file type detection
|
||||||
syntax region htmlVueTemplate fold
|
syntax region htmlVueTemplate fold
|
||||||
\ start=+<template\(\s.\{-}\)\?>+
|
\ start=+<template\(\s.\{-}\)\?>+
|
||||||
\ end=+^</template>+
|
\ end=+^</template>+
|
||||||
@@ -160,6 +168,10 @@ syntax region javascriptVueScript fold
|
|||||||
\ start=+<script\(\s.\{-}\)\?>+
|
\ start=+<script\(\s.\{-}\)\?>+
|
||||||
\ end=+</script>+
|
\ end=+</script>+
|
||||||
\ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag
|
\ keepend contains=@htmlJavaScript,jsImport,jsExport,vueTag
|
||||||
|
syntax region coffeeVueScript fold
|
||||||
|
\ start=+<script lang="coffee"\(\s.\{-}\)\?>+
|
||||||
|
\ end=+</script>+
|
||||||
|
\ keepend contains=@htmlCoffeeScript,jsImport,jsExport,vueTag
|
||||||
|
|
||||||
syntax region cssVueStyle fold
|
syntax region cssVueStyle fold
|
||||||
\ start=+<style\(\s.\{-}\)\?>+
|
\ start=+<style\(\s.\{-}\)\?>+
|
||||||
|
|||||||
Reference in New Issue
Block a user