diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2015-07-18 23:05:45 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-07-18 23:05:45 +0200 | 
| commit | 92ab75408df8bff49bb29e113b3cc159d1ac3105 (patch) | |
| tree | 77cd9b27eb0b1e43f8c456520748e6715bc7a250 /after | |
| parent | f977779693518c748d87fb5babd98f6ef411837c (diff) | |
| download | vim-polyglot-92ab75408df8bff49bb29e113b3cc159d1ac3105.tar.gz vim-polyglot-92ab75408df8bff49bb29e113b3cc159d1ac3105.zip | |
Allow for disabling individual languages, closes #66
Diffstat (limited to 'after')
30 files changed, 128 insertions, 0 deletions
| 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 <SID>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 <mick@kochm.co>  " 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 <jon@haeggblad.com> @@ -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 <jon@haeggblad.com> @@ -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 <pagaltzis@gmx.de>  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 <Svelix.Github@gmail.com>  " 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 <mick@kochm.co>  " URL:         http://github.com/kchmck/vim-coffee-script @@ -9,6 +11,10 @@ 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 +    if !exists("g:less_html_style_tags")    let g:less_html_style_tags = 1  endif @@ -35,6 +41,10 @@ syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end  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 +    " Language:     Colorful CSS Color Preview  " Author:       Aristotle Pagaltzis <pagaltzis@gmx.de> @@ -42,3 +52,5 @@ 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 diff --git a/after/syntax/json.vim b/after/syntax/json.vim index dfca138e..ef6f55e4 100644 --- a/after/syntax/json.vim +++ b/after/syntax/json.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('css', 'none', 'jsonString') + +endif diff --git a/after/syntax/jsx.vim b/after/syntax/jsx.vim index 63a1248f..ff3c907e 100644 --- a/after/syntax/jsx.vim +++ b/after/syntax/jsx.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 +    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""  " Vim syntax file  " @@ -41,3 +43,5 @@ syn region xmlString contained start=+{+ end=++ contains=jsBlock,javascriptBlock  " Add jsxRegion to the lowest-level JS syntax cluster.  syn cluster jsExpression add=jsxRegion + +endif diff --git a/after/syntax/less.vim b/after/syntax/less.vim index e6381a76..bb7bb56a 100644 --- a/after/syntax/less.vim +++ b/after/syntax/less.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css-color') == -1 +    " Language:     Colorful CSS Color Preview  " Author:       Aristotle Pagaltzis <pagaltzis@gmx.de> @@ -11,3 +13,5 @@ if !( has('gui_running') || &t_Co==256 ) | finish | endif  " lessVariableDefinition | cssDefinition  | cssComment     | lessComment | https://github.com/lunaru/vim-less  call css_color#init('css', 'extended', 'lessVariableValue,lessVariableDefinition,lessDefinition,lessCssAttribute,lessAttribute,cssDefinition,cssComment,lessCssComment,lessComment') + +endif diff --git a/after/syntax/lua.vim b/after/syntax/lua.vim index 481c996c..5bdb2aaa 100644 --- a/after/syntax/lua.vim +++ b/after/syntax/lua.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('hex', 'extended', 'luaComment,luaString') + +endif diff --git a/after/syntax/moon.vim b/after/syntax/moon.vim index c200e64b..ae35c895 100644 --- a/after/syntax/moon.vim +++ b/after/syntax/moon.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('hex', 'extended', 'moonComment,moonString') + +endif diff --git a/after/syntax/rspec.vim b/after/syntax/rspec.vim index 390f6d10..518097e2 100644 --- a/after/syntax/rspec.vim +++ b/after/syntax/rspec.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1 +    "  " An rspec syntax file  " Originally from http://www.vim.org/scripts/script.php?script_id=2286 @@ -30,3 +32,5 @@ syntax keyword rspecMessageExpectation advise any_args any_number_of_times anyth  highlight link rspecMessageExpectation Function  let b:current_syntax = 'rspec' + +endif diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim index 781e614a..0bfa2570 100644 --- a/after/syntax/ruby.vim +++ b/after/syntax/ruby.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yard') == -1 +    " Ruby syntax extensions for highlighting YARD documentation.  "  " Author: Joel Holdbrooks <https://github.com/noprompt> @@ -124,3 +126,5 @@ hi def link yardParametricType yardComment  hi def link yardArrow yardComment  hi def link yardHashAngle yardComment  hi def link yardHashCurly yardComment + +endif diff --git a/after/syntax/rust.vim b/after/syntax/rust.vim index 735c1e15..5748c4df 100644 --- a/after/syntax/rust.vim +++ b/after/syntax/rust.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +    if !exists('g:rust_conceal') || !has('conceal') || &enc != 'utf-8'  	finish  endif @@ -29,3 +31,5 @@ hi link rustNiceOperator Operator  if !exists('g:rust_conceal_mod_path')      hi! link Conceal Operator  endif + +endif diff --git a/after/syntax/sass.vim b/after/syntax/sass.vim index ce73d75a..fcaa888c 100644 --- a/after/syntax/sass.vim +++ b/after/syntax/sass.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('css', 'extended', 'sassCssAttribute,sassComment,sassCssComment') + +endif diff --git a/after/syntax/scss.vim b/after/syntax/scss.vim index 15fcac7e..26095a4a 100644 --- a/after/syntax/scss.vim +++ b/after/syntax/scss.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('css', 'extended', 'scssAttribute,scssComment,scssVariableValue,sassCssAttribute,cssComment') + +endif diff --git a/after/syntax/stylus.vim b/after/syntax/stylus.vim index eadc95ff..98fb1eed 100644 --- a/after/syntax/stylus.vim +++ b/after/syntax/stylus.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('css', 'extended', 'stylusCssAttribute,stylusComment,cssComment') + +endif diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 9f4d761f..f066fbe8 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'latex') == -1 +    " adds support for cleverref package  " \Cref, \cref, \cpageref, \labelcref, \labelcpageref  syn region texRefZone		matchgroup=texStatement start="\\Cref{"				end="}\|%stopzone\>"	contains=@texRefGroup @@ -7,3 +9,5 @@ syn region texRefZone		matchgroup=texStatement start="\\\(label\|\)c\(page\|\)re  syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>"  syn match texInputFile  "\\lstinputlisting\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt  syn match texZone "\\lstinline\s*\(\[.*\]\)\={.\{-}}" + +endif diff --git a/after/syntax/vim.vim b/after/syntax/vim.vim index 53023d45..1a0cf823 100644 --- a/after/syntax/vim.vim +++ b/after/syntax/vim.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('hex', 'none', 'vimHiGuiRgb,vimComment,vimLineComment') + +endif diff --git a/after/syntax/yaml.vim b/after/syntax/yaml.vim index 62f83a8e..89850571 100644 --- a/after/syntax/yaml.vim +++ b/after/syntax/yaml.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 <pagaltzis@gmx.de>  if !( has('gui_running') || &t_Co==256 ) | finish | endif  call css_color#init('hex', 'extended', 'yamlComment,yamlFlowString,yamlPlainScalar') + +endif | 
