mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 13:44:46 +08:00
Support TypeScript syntax
This commit is contained in:
@@ -28,6 +28,8 @@ 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")
|
let s:use_coffee = exists("g:vim_vue_plugin_use_coffee")
|
||||||
\ && g:vim_vue_plugin_use_coffee == 1
|
\ && g:vim_vue_plugin_use_coffee == 1
|
||||||
|
let s:use_typescript = exists("g:vim_vue_plugin_use_typescript")
|
||||||
|
\ && g:vim_vue_plugin_use_typescript == 1
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@@ -123,6 +125,11 @@ endif
|
|||||||
if s:use_coffee
|
if s:use_coffee
|
||||||
call s:LoadFullSyntax('@htmlCoffeeScript', 'coffee')
|
call s:LoadFullSyntax('@htmlCoffeeScript', 'coffee')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" If TypeScript is enabled, load the syntax.
|
||||||
|
if s:use_typescript
|
||||||
|
call s:LoadFullSyntax('@TypeScript', 'typescript')
|
||||||
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@@ -162,6 +169,11 @@ syntax region coffeeVueScript fold
|
|||||||
\ end=+</script>+
|
\ end=+</script>+
|
||||||
\ keepend contains=@htmlCoffeeScript,jsImport,jsExport,vueTag
|
\ keepend contains=@htmlCoffeeScript,jsImport,jsExport,vueTag
|
||||||
|
|
||||||
|
syntax region typescriptVueScript fold
|
||||||
|
\ start=+<script[^>]*lang="ts"[^>]*>+
|
||||||
|
\ end=+</script>+
|
||||||
|
\ keepend contains=@TypeScript,vueTag
|
||||||
|
|
||||||
syntax region cssLessVueStyle fold
|
syntax region cssLessVueStyle fold
|
||||||
\ start=+<style[^>]*lang="less"[^>]*>+
|
\ start=+<style[^>]*lang="less"[^>]*>+
|
||||||
\ end=+</style>+
|
\ end=+</style>+
|
||||||
|
|||||||
Reference in New Issue
Block a user