vim-polyglot/after/syntax/html.vim

57 lines
1.9 KiB
VimL
Raw Normal View History

if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1
" Language: CoffeeScript
2014-11-10 20:37:21 -05:00
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL
" Syntax highlighting for text/coffeescript script tags
syn include @htmlCoffeeScript syntax/coffee.vim
syn region coffeeScript start=#<script [^>]*type="text/coffeescript"[^>]*>#
\ end=#</script>#me=s-1 keepend
\ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc
\ containedin=htmlHead
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1
2014-08-27 12:16:33 -04:00
if !exists("g:less_html_style_tags")
let g:less_html_style_tags = 1
endif
if !g:less_html_style_tags
finish
endif
" Unset (but preserve) so that less will run.
2014-11-10 20:37:21 -05:00
if exists("b:current_syntax")
let s:pre_less_cur_syn = b:current_syntax
unlet b:current_syntax
endif
2014-08-27 12:16:33 -04:00
" Inspired by code from github.com/kchmck/vim-coffee-script
" and the html syntax file included with vim 7.4.
syn include @htmlLess syntax/less.vim
" We have to explicitly add to htmlHead (containedin) as that region specifies 'contains'.
syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead
" Reset since 'less' isn't really the current_syntax.
2014-11-10 20:37:21 -05:00
if exists("s:pre_less_cur_syn")
let b:current_syntax = s:pre_less_cur_syn
endif
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css-color') == -1
2014-04-14 19:23:13 -04:00
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
if !( has('gui_running') || &t_Co==256 ) | finish | endif
" default html syntax should already be including the css syntax
syn cluster colorableGroup add=htmlString,htmlCommentPart
endif