diff --git a/README.md b/README.md index eefb9ee..d0828d5 100644 --- a/README.md +++ b/README.md @@ -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 d6c1e81..0000000 --- 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 -" 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('', '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 da2ea2b..0000000 --- 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 -" 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 a324db1..fcb7fd5 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 -" 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=##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 - -syn include @GLSL syntax/glsl.vim -syn region ShaderScript - \ start=""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=++ contains=@Spell syntax region htmlComment start=++ -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=++ 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 diff --git a/build b/build index 8de0a45..c94ccc0 100755 --- a/build +++ b/build @@ -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 3ab9380..c1cdcbe 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 @@ -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