diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-03-10 20:14:21 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-03-10 20:14:21 +0100 |
commit | 571f76e6b62ef4535322345094b23605d7308e72 (patch) | |
tree | ad45b82f26243740eea48f548484d0795f1d1c46 | |
parent | e4f906d9a543dfb3520eebe6806eac2ff38c4388 (diff) | |
download | vim-polyglot-571f76e6b62ef4535322345094b23605d7308e72.tar.gz vim-polyglot-571f76e6b62ef4535322345094b23605d7308e72.zip |
Remove rare html extensions, fixes #280
Diffstat (limited to '')
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | after/indent/html.vim | 37 | ||||
-rw-r--r-- | after/syntax/haml.vim | 27 | ||||
-rw-r--r-- | after/syntax/html.vim | 67 | ||||
-rwxr-xr-x | build | 8 | ||||
-rw-r--r-- | ftdetect/polyglot.vim | 4 |
6 files changed, 8 insertions, 137 deletions
@@ -57,7 +57,7 @@ If you need full functionality of any plugin, please use it directly with your p - [cjsx](https://github.com/mtscout6/vim-cjsx) (syntax, ftplugin) - [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin) - [cmake](https://github.com/pboettch/vim-cmake-syntax) (syntax, indent) -- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin) +- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, compiler, indent, autoload, ftplugin) - [cql](https://github.com/elubow/cql-vim) (syntax) - [cryptol](https://github.com/victoredwardocallaghan/cryptol.vim) (syntax, compiler, ftplugin) - [crystal](https://github.com/rhysd/vim-crystal) (syntax, indent, autoload, ftplugin) diff --git a/after/indent/html.vim b/after/indent/html.vim deleted file mode 100644 index d6c1e812..00000000 --- a/after/indent/html.vim +++ /dev/null @@ -1,37 +0,0 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1 - finish -endif - -" Language: CoffeeScript -" Maintainer: Mick Koch <mick@kochm.co> -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -" Load the coffee and html indent functions. -silent! unlet b:did_indent -runtime indent/coffee.vim -let s:coffeeIndentExpr = &l:indentexpr - -" Load html last so it can overwrite coffee settings. -silent! unlet b:did_indent -runtime indent/html.vim -let s:htmlIndentExpr = &l:indentexpr - -" Inject our wrapper indent function. -setlocal indentexpr=GetCoffeeHtmlIndent(v:lnum) - -function! GetCoffeeHtmlIndent(curlinenum) - " See if we're inside a coffeescript block. - let scriptlnum = searchpair('<script [^>]*type=[''"]\?text/coffeescript[''"]\?[^>]*>', '', - \ '</script>', 'bWn') - let prevlnum = prevnonblank(a:curlinenum) - - " If we're in the script block and the previous line isn't the script tag - " itself, use coffee indenting. - if scriptlnum && scriptlnum != prevlnum - exec 'return ' s:coffeeIndentExpr - endif - - " Otherwise use html indenting. - exec 'return ' s:htmlIndentExpr -endfunction diff --git a/after/syntax/haml.vim b/after/syntax/haml.vim deleted file mode 100644 index da2ea2b1..00000000 --- a/after/syntax/haml.vim +++ /dev/null @@ -1,27 +0,0 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1 - finish -endif - -" Language: CoffeeScript -" Maintainer: Sven Felix Oberquelle <Svelix.Github@gmail.com> -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - - -if exists('b:current_syntax') - let s:current_syntax_save = b:current_syntax -endif - -" Inherit coffee from html so coffeeComment isn't redefined and given higher -" priority than hamlInterpolation. -syn cluster hamlCoffeescript contains=@htmlCoffeeScript -syn region hamlCoffeescriptFilter matchgroup=hamlFilter -\ start="^\z(\s*\):coffee\z(script\)\?\s*$" -\ end="^\%(\z1 \| *$\)\@!" -\ contains=@hamlCoffeeScript,hamlInterpolation -\ keepend - -if exists('s:current_syntax_save') - let b:current_syntax = s:current_syntax_save - unlet s:current_syntax_save -endif diff --git a/after/syntax/html.vim b/after/syntax/html.vim index a324db1a..fcb7fd51 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -1,40 +1,3 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1 - finish -endif - -" Language: CoffeeScript -" Maintainer: Mick Koch <mick@kochm.co> -" URL: http://github.com/kchmck/vim-coffee-script -" License: WTFPL - -if exists('b:current_syntax') - let s:current_syntax_save = b:current_syntax -endif - -" 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 - -if exists('s:current_syntax_save') - let b:current_syntax = s:current_syntax_save - unlet s:current_syntax_save -endif -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'glsl') != -1 - finish -endif - -" Language: OpenGL Shading Language -" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io> - -syn include @GLSL syntax/glsl.vim -syn region ShaderScript - \ start="<script [^>]*type=\('\|\"\)x-shader/x-\(vertex\|fragment\)\('\|\"\)[^>]*>" - \ keepend - \ end="</script>"me=s-1 - \ contains=@GLSL,htmlScriptTag,@htmlPreproc if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'html5') != -1 finish endif @@ -51,33 +14,3 @@ endif " https://github.com/w3c/html/issues/694 syntax region htmlComment start=+<!--+ end=+-->+ contains=@Spell syntax region htmlComment start=+<!DOCTYPE+ keepend end=+>+ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'less') != -1 - finish -endif - -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. -if exists("b:current_syntax") - let s:pre_less_cur_syn = b:current_syntax - unlet b:current_syntax -endif - -" 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. -if exists("s:pre_less_cur_syn") - let b:current_syntax = s:pre_less_cur_syn -endif @@ -9,6 +9,8 @@ DIRS_BASIC="syntax compiler indent after/syntax after/indent" DIRS_ALL="syntax indent compiler autoload ftplugin after" # shellcheck disable=SC2034 DIRS_SYNTAX="syntax indent after/syntax after/indent" +# shellcheck disable=SC2034 +DIRS_NOAFTER="syntax compiler indent autoload ftplugin" DIRS_JAVASCRIPT="${DIRS} extras" read -r -a DIRS_RM <<<"$DIRS_JAVASCRIPT" @@ -165,7 +167,7 @@ PACKS=" cjsx:mtscout6/vim-cjsx clojure:guns/vim-clojure-static cmake:pboettch/vim-cmake-syntax - coffee-script:kchmck/vim-coffee-script + coffee-script:kchmck/vim-coffee-script:_NOAFTER cql:elubow/cql-vim cryptol:victoredwardocallaghan/cryptol.vim crystal:rhysd/vim-crystal @@ -183,7 +185,7 @@ PACKS=" flatbuffers:dcharbon/vim-flatbuffers fsharp:fsharp/vim-fsharp:_BASIC git:tpope/vim-git - glsl:tikhomirov/vim-glsl + glsl:tikhomirov/vim-glsl:_NOAFTER gmpl:maelvalais/gmpl.vim gnuplot:vim-scripts/gnuplot-syntax-highlighting go:fatih/vim-go:_BASIC @@ -210,7 +212,7 @@ PACKS=" julia:JuliaEditorSupport/julia-vim kotlin:udalov/kotlin-vim latex:LaTeX-Box-Team/LaTeX-Box - less:groenewege/vim-less + less:groenewege/vim-less:_NOAFTER liquid:tpope/vim-liquid lilypond:anowlcalledjosh/vim-lilypond livescript:gkz/vim-ls diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 3ab93802..c1cdcbe9 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -365,7 +365,7 @@ endif if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1 augroup filetypedetect - " glsl, from glsl.vim in tikhomirov/vim-glsl + " glsl, from glsl.vim in tikhomirov/vim-glsl:_NOAFTER " Language: OpenGL Shading Language " Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io> @@ -640,7 +640,7 @@ endif if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 augroup filetypedetect - " less, from less.vim in groenewege/vim-less + " less, from less.vim in groenewege/vim-less:_NOAFTER autocmd BufNewFile,BufRead *.less setf less augroup end endif |