From 92ab75408df8bff49bb29e113b3cc159d1ac3105 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 18 Jul 2015 23:05:45 +0200 Subject: Allow for disabling individual languages, closes #66 --- after/ftdetect/javascript.vim | 4 ++ after/ftdetect/rspec.vim | 4 ++ after/ftplugin/coffee.vim | 4 ++ after/ftplugin/haskell.vim | 4 ++ after/ftplugin/jsx.vim | 4 ++ after/ftplugin/puppet.vim | 4 ++ after/indent/html.vim | 4 ++ after/indent/jsx.vim | 4 ++ after/jsx-config.vim | 4 ++ after/syntax/c.vim | 4 ++ after/syntax/coffee.vim | 4 ++ after/syntax/cpp.vim | 4 ++ after/syntax/css.vim | 4 ++ after/syntax/haml.vim | 4 ++ after/syntax/help.vim | 4 ++ after/syntax/html.vim | 12 ++++ after/syntax/json.vim | 4 ++ after/syntax/jsx.vim | 4 ++ after/syntax/less.vim | 4 ++ after/syntax/lua.vim | 4 ++ after/syntax/moon.vim | 4 ++ after/syntax/rspec.vim | 4 ++ after/syntax/ruby.vim | 4 ++ after/syntax/rust.vim | 4 ++ after/syntax/sass.vim | 4 ++ after/syntax/scss.vim | 4 ++ after/syntax/stylus.vim | 4 ++ after/syntax/tex.vim | 4 ++ after/syntax/vim.vim | 4 ++ after/syntax/yaml.vim | 4 ++ autoload/clojurecomplete.vim | 4 ++ autoload/coffee.vim | 4 ++ autoload/css_color.vim | 4 ++ autoload/htmlcomplete.vim | 4 ++ autoload/rubycomplete.vim | 4 ++ autoload/rust.vim | 4 ++ autoload/xml/aria.vim | 4 ++ autoload/xml/html5.vim | 4 ++ compiler/cake.vim | 4 ++ compiler/cargo.vim | 4 ++ compiler/coffee.vim | 4 ++ compiler/cucumber.vim | 4 ++ compiler/eruby.vim | 4 ++ compiler/exunit.vim | 4 ++ compiler/haml.vim | 4 ++ compiler/rake.vim | 4 ++ compiler/rspec.vim | 4 ++ compiler/ruby.vim | 4 ++ compiler/rubyunit.vim | 4 ++ compiler/rustc.vim | 4 ++ compiler/sass.vim | 4 ++ compiler/sbt.vim | 4 ++ compiler/typescript.vim | 4 ++ ftdetect/polyglot.vim | 150 ++++++++++++++++++++++++++++++++++++++++ ftplugin/clojure.vim | 4 ++ ftplugin/coffee.vim | 4 ++ ftplugin/cucumber.vim | 4 ++ ftplugin/eelixir.vim | 4 ++ ftplugin/elixir.vim | 4 ++ ftplugin/ember-script.vim | 4 ++ ftplugin/emblem.vim | 4 ++ ftplugin/eruby.vim | 4 ++ ftplugin/git.vim | 4 ++ ftplugin/gitcommit.vim | 4 ++ ftplugin/gitconfig.vim | 4 ++ ftplugin/gitrebase.vim | 4 ++ ftplugin/gitsendemail.vim | 4 ++ ftplugin/haml.vim | 4 ++ ftplugin/html.vim | 4 ++ ftplugin/jade.vim | 4 ++ ftplugin/latex-box/common.vim | 4 ++ ftplugin/latex-box/complete.vim | 4 ++ ftplugin/latex-box/findmain.vim | 4 ++ ftplugin/latex-box/folding.vim | 4 ++ ftplugin/latex-box/latexmk.vim | 4 ++ ftplugin/latex-box/mappings.vim | 4 ++ ftplugin/latex-box/motion.vim | 4 ++ ftplugin/latextoc.vim | 4 ++ ftplugin/less.vim | 4 ++ ftplugin/liquid.vim | 4 ++ ftplugin/markdown.vim | 4 ++ ftplugin/mustache.vim | 4 ++ ftplugin/ocaml.vim | 4 ++ ftplugin/opencl.vim | 4 ++ ftplugin/perl.vim | 4 ++ ftplugin/perl6.vim | 4 ++ ftplugin/ps1.vim | 4 ++ ftplugin/ps1xml.vim | 4 ++ ftplugin/puppet.vim | 4 ++ ftplugin/r.vim | 4 ++ ftplugin/rhelp.vim | 4 ++ ftplugin/rnoweb.vim | 4 ++ ftplugin/ruby.vim | 4 ++ ftplugin/rust.vim | 4 ++ ftplugin/sass.vim | 4 ++ ftplugin/scala.vim | 4 ++ ftplugin/scala.xpt.vim | 4 ++ ftplugin/scala/tagbar.vim | 4 ++ ftplugin/scss.vim | 4 ++ ftplugin/stylus.vim | 4 ++ ftplugin/tex_LatexBox.vim | 4 ++ ftplugin/textile.vim | 4 ++ ftplugin/toml.vim | 4 ++ ftplugin/tt2html.vim | 4 ++ ftplugin/twig.vim | 4 ++ ftplugin/typescript.vim | 4 ++ ftplugin/xs.vim | 4 ++ indent/arduino.vim | 4 ++ indent/blade.vim | 4 ++ indent/clojure.vim | 4 ++ indent/coffee.vim | 4 ++ indent/cucumber.vim | 4 ++ indent/eelixir.vim | 4 ++ indent/elixir.vim | 4 ++ indent/ember-script.vim | 4 ++ indent/emblem.vim | 4 ++ indent/erlang.vim | 4 ++ indent/eruby.vim | 4 ++ indent/gitconfig.vim | 4 ++ indent/go.vim | 4 ++ indent/gohtmltmpl.vim | 4 ++ indent/haml.vim | 4 ++ indent/haskell.vim | 4 ++ indent/html.vim | 4 ++ indent/jade.vim | 4 ++ indent/javascript.vim | 4 ++ indent/json.vim | 4 ++ indent/jst.vim | 4 ++ indent/julia.vim | 4 ++ indent/less.vim | 5 +- indent/liquid.vim | 4 ++ indent/ocaml.vim | 4 ++ indent/opencl.vim | 4 ++ indent/perl.vim | 4 ++ indent/perl6.vim | 4 ++ indent/ps1.vim | 4 ++ indent/puppet.vim | 4 ++ indent/python.vim | 4 ++ indent/ruby.vim | 4 ++ indent/rust.vim | 4 ++ indent/sass.vim | 4 ++ indent/scala.vim | 4 ++ indent/scss.vim | 4 ++ indent/slim.vim | 4 ++ indent/solidity.vim | 4 ++ indent/stylus.vim | 4 ++ indent/swift.vim | 4 ++ indent/tex.vim | 4 ++ indent/typescript.vim | 4 ++ indent/vala.vim | 4 ++ indent/velocity.vim | 4 ++ syntax/arduino.vim | 4 ++ syntax/blade.vim | 4 ++ syntax/c.vim | 4 ++ syntax/cabal.vim | 4 ++ syntax/clojure.vim | 4 ++ syntax/coffee.vim | 4 ++ syntax/cpp.vim | 4 ++ syntax/css.vim | 4 ++ syntax/cucumber.vim | 4 ++ syntax/dockerfile.vim | 4 ++ syntax/eelixir.vim | 4 ++ syntax/elixir.vim | 4 ++ syntax/ember-script.vim | 4 ++ syntax/emblem.vim | 4 ++ syntax/erlang.vim | 4 ++ syntax/eruby.vim | 4 ++ syntax/git.vim | 4 ++ syntax/gitcommit.vim | 4 ++ syntax/gitconfig.vim | 4 ++ syntax/gitrebase.vim | 4 ++ syntax/gitsendemail.vim | 4 ++ syntax/go.vim | 4 ++ syntax/godoc.vim | 4 ++ syntax/gohtmltmpl.vim | 4 ++ syntax/gotexttmpl.vim | 4 ++ syntax/haml.vim | 4 ++ syntax/haskell.vim | 4 ++ syntax/haxe.vim | 4 ++ syntax/html.vim | 4 ++ syntax/html/aria.vim | 4 ++ syntax/html/rdfa.vim | 4 ++ syntax/jade.vim | 4 ++ syntax/jasmine.vim | 4 ++ syntax/javascript.vim | 4 ++ syntax/javascript/html5.vim | 4 ++ syntax/json.vim | 4 ++ syntax/jst.vim | 4 ++ syntax/julia.vim | 4 ++ syntax/latextoc.vim | 4 ++ syntax/less.vim | 4 ++ syntax/liquid.vim | 4 ++ syntax/markdown.vim | 4 ++ syntax/mason.vim | 4 ++ syntax/mustache.vim | 4 ++ syntax/nginx.vim | 4 ++ syntax/ocaml.vim | 4 ++ syntax/octave.vim | 4 ++ syntax/opencl.vim | 4 ++ syntax/perl.vim | 4 ++ syntax/perl6.vim | 4 ++ syntax/php.vim | 4 ++ syntax/pod.vim | 4 ++ syntax/proto.vim | 4 ++ syntax/ps1.vim | 4 ++ syntax/ps1xml.vim | 4 ++ syntax/puppet.vim | 4 ++ syntax/python.vim | 4 ++ syntax/ragel.vim | 4 ++ syntax/rhelp.vim | 4 ++ syntax/rnoweb.vim | 4 ++ syntax/ruby.vim | 4 ++ syntax/rust.vim | 4 ++ syntax/sass.vim | 4 ++ syntax/sbt.vim | 4 ++ syntax/scala.vim | 4 ++ syntax/scss.vim | 4 ++ syntax/slim.vim | 4 ++ syntax/solidity.vim | 4 ++ syntax/stylus.vim | 4 ++ syntax/swift.vim | 4 ++ syntax/systemd.vim | 4 ++ syntax/tap.vim | 4 ++ syntax/textile.vim | 4 ++ syntax/thrift.vim | 4 ++ syntax/tmux.vim | 4 ++ syntax/tomdoc.vim | 4 ++ syntax/toml.vim | 4 ++ syntax/tt2.vim | 4 ++ syntax/tt2html.vim | 4 ++ syntax/tt2js.vim | 4 ++ syntax/twig.vim | 4 ++ syntax/typescript.vim | 4 ++ syntax/vala.vim | 4 ++ syntax/vbnet.vim | 4 ++ syntax/velocity.vim | 4 ++ syntax/vimgo.vim | 4 ++ syntax/xs.vim | 4 ++ syntax/xsl.vim | 4 ++ 239 files changed, 1110 insertions(+), 1 deletion(-) diff --git a/after/ftdetect/javascript.vim b/after/ftdetect/javascript.vim index 900fce11..a0de1b1f 100644 --- a/after/ftdetect/javascript.vim +++ b/after/ftdetect/javascript.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim ftdetect file " @@ -18,3 +20,5 @@ autocmd BufNewFile,BufRead *.jsx let b:jsx_ext_found = 1 autocmd BufNewFile,BufRead *.jsx set filetype=javascript.jsx autocmd BufNewFile,BufRead *.js \ if EnableJSX() | set filetype=javascript.jsx | endif + +endif diff --git a/after/ftdetect/rspec.vim b/after/ftdetect/rspec.vim index ce43f581..d4a0a5cc 100644 --- a/after/ftdetect/rspec.vim +++ b/after/ftdetect/rspec.vim @@ -1,2 +1,6 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1 + autocmd BufReadPost,BufNewFile *_spec.rb set syntax=rspec autocmd BufReadPost,BufNewFile *_spec.rb setlocal commentstring=#\ %s + +endif diff --git a/after/ftplugin/coffee.vim b/after/ftplugin/coffee.vim index 104948d1..9c8f5843 100644 --- a/after/ftplugin/coffee.vim +++ b/after/ftplugin/coffee.vim @@ -1,5 +1,9 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 + if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = '(:),\[:\],{:},<:>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' endif + +endif diff --git a/after/ftplugin/haskell.vim b/after/ftplugin/haskell.vim index 536e84bb..4b315458 100644 --- a/after/ftplugin/haskell.vim +++ b/after/ftplugin/haskell.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 + " Vim ftplugin file " Language: Haskell " Maintainer: Tristan Ravitch @@ -7,3 +9,5 @@ " hate the leading '-'s it puts in on each line). Disable it here. setlocal comments& setlocal comments=:-- + +endif diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim index ee642090..76b0a327 100644 --- a/after/ftplugin/jsx.vim +++ b/after/ftplugin/jsx.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim ftplugin file " @@ -15,3 +17,5 @@ if exists("loaded_matchit") endif setlocal suffixesadd+=.jsx + +endif diff --git a/after/ftplugin/puppet.vim b/after/ftplugin/puppet.vim index f976a457..574fee25 100644 --- a/after/ftplugin/puppet.vim +++ b/after/ftplugin/puppet.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 + if !exists('g:puppet_align_hashes') let g:puppet_align_hashes = 1 endif @@ -14,3 +16,5 @@ if g:puppet_align_hashes && exists(':Tabularize') call search(repeat('\([^=]\|=[^>]\)*=>',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) endfunction endif + +endif diff --git a/after/indent/html.vim b/after/indent/html.vim index 2fa86371..a7113514 100644 --- a/after/indent/html.vim +++ b/after/indent/html.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 + " Language: CoffeeScript " Maintainer: Mick Koch " URL: http://github.com/kchmck/vim-coffee-script @@ -31,3 +33,5 @@ function! GetCoffeeHtmlIndent(curlinenum) " Otherwise use html indenting. exec 'return ' s:htmlIndentExpr endfunction + +endif diff --git a/after/indent/jsx.vim b/after/indent/jsx.vim index d0b4d4ef..d33c13dd 100644 --- a/after/indent/jsx.vim +++ b/after/indent/jsx.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim indent file " @@ -96,3 +98,5 @@ fu! GetJsxIndent() return ind endfu + +endif diff --git a/after/jsx-config.vim b/after/jsx-config.vim index a1d4cbe0..0303fb0c 100644 --- a/after/jsx-config.vim +++ b/after/jsx-config.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vimscript file " @@ -31,3 +33,5 @@ if !g:jsx_pragma_required | finish | endif " anything else in the file (except whitespace). let s:jsx_pragma_pattern = '\%^\_s*\/\*\*\%(\_.\%(\*\/\)\@!\)*@jsx\_.\{-}\*\/' let b:jsx_pragma_found = search(s:jsx_pragma_pattern, 'npw') + +endif diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 0805d666..aa4a31ec 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 + " Vim syntax file " Language: C Additions " Maintainer: Jon Haggblad @@ -290,3 +292,5 @@ hi def link cBoolean Boolean "hi def link cDelimiter Delimiter " foldmethod=syntax fix, courtesy of Ivan Freitas "hi def link cBraces Delimiter + +endif diff --git a/after/syntax/coffee.vim b/after/syntax/coffee.vim index 64e0dc4f..b77c12bb 100644 --- a/after/syntax/coffee.vim +++ b/after/syntax/coffee.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 + if exists('b:current_syntax') let s:current_syntax=b:current_syntax unlet b:current_syntax @@ -25,3 +27,5 @@ hi def link cjsxTagName Function hi def link cjsxEntity Statement hi def link cjsxEntityPunct Type hi def link cjsxAttribProperty Type + +endif diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim index 5a0c2183..6eb3cfad 100644 --- a/after/syntax/cpp.vim +++ b/after/syntax/cpp.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 + " Vim syntax file " Language: C++ Additions " Maintainer: Jon Haggblad @@ -1364,3 +1366,5 @@ if version >= 508 || !exists("did_cpp_syntax_inits") HiLink cppRawDelimiter Delimiter delcommand HiLink endif + +endif diff --git a/after/syntax/css.vim b/after/syntax/css.vim index ffb3e43d..afe9da60 100644 --- a/after/syntax/css.vim +++ b/after/syntax/css.vim @@ -1,6 +1,10 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css-color') == -1 + " Language: Colorful CSS Color Preview " Author: Aristotle Pagaltzis if !( has('gui_running') || &t_Co==256 ) | finish | endif call css_color#init('css', 'extended', 'cssMediaBlock,cssFunction,cssDefinition,cssAttrRegion,cssComment') + +endif diff --git a/after/syntax/haml.vim b/after/syntax/haml.vim index 4c517ebb..5333de69 100644 --- a/after/syntax/haml.vim +++ b/after/syntax/haml.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 + " Language: CoffeeScript " Maintainer: Sven Felix Oberquelle " URL: http://github.com/kchmck/vim-coffee-script @@ -11,3 +13,5 @@ syn region hamlCoffeescriptFilter matchgroup=hamlFilter \ end="^\%(\z1 \| *$\)\@!" \ contains=@hamlCoffeeScript,hamlInterpolation \ keepend + +endif diff --git a/after/syntax/help.vim b/after/syntax/help.vim index e3232128..58b79943 100644 --- a/after/syntax/help.vim +++ b/after/syntax/help.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 + " Extends standard help syntax with highlighting of Scala code. " " Place code between !sc! and !/sc! delimiters. These will be hidden if Vim is @@ -12,3 +14,5 @@ if has('conceal') else syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode endif + +endif diff --git a/after/syntax/html.vim b/after/syntax/html.vim index b9dc9f98..7ea622c6 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 + " Language: CoffeeScript " Maintainer: Mick Koch " URL: http://github.com/kchmck/vim-coffee-script @@ -9,6 +11,10 @@ syn region coffeeScript start=##me=s-1 keepend \ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc \ containedin=htmlHead + +endif +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 + if !exists("g:less_html_style_tags") let g:less_html_style_tags = 1 endif @@ -35,6 +41,10 @@ syn region lessStyle start=+