Skip to content

Commit

Permalink
Change plugin guard for disabling, fixes #371
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Mar 4, 2019
1 parent ed677c3 commit 1597b7b
Show file tree
Hide file tree
Showing 413 changed files with 1,662 additions and 1,661 deletions.
8 changes: 4 additions & 4 deletions after/ftplugin/cabal.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'haskell') != -1
finish
endif

setlocal comments=s1fl:{-,mb:-,ex:-},:--
setlocal iskeyword+=-,.,*
setlocal commentstring=--\ %s

endif
8 changes: 4 additions & 4 deletions after/ftplugin/coffee.vim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'cjsx') != -1
finish
endif

if exists("loaded_matchit")
let b:match_ignorecase = 0
let b:match_words = '(:),\[:\],{:},<:>,' .
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
endif

endif
8 changes: 4 additions & 4 deletions after/ftplugin/haskell.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'haskell') != -1
finish
endif

setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--
setlocal iskeyword+='

endif
8 changes: 4 additions & 4 deletions after/ftplugin/javascript.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'javascript') != -1
finish
endif

" Vim filetype plugin file
" Language: JavaScript
" Maintainer: vim-javascript community
Expand All @@ -12,5 +14,3 @@ if exists('b:undo_ftplugin')
else
let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<'
endif

endif
8 changes: 4 additions & 4 deletions after/ftplugin/jsx.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
finish
endif

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim ftplugin file
"
Expand All @@ -19,5 +21,3 @@ if exists("loaded_matchit")
endif

setlocal suffixesadd+=.jsx

endif
8 changes: 4 additions & 4 deletions after/ftplugin/puppet.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'puppet') != -1
finish
endif

if !exists('g:puppet_align_hashes')
let g:puppet_align_hashes = 1
endif
Expand All @@ -16,5 +18,3 @@ if g:puppet_align_hashes && exists(':Tabularize')
call search(repeat('\([^=]\|=[^>]\)*=>',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
endfunction
endif

endif
8 changes: 4 additions & 4 deletions after/ftplugin/terraform.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'terraform') != -1
finish
endif

if !exists('g:terraform_align')
let g:terraform_align = 0
endif
Expand Down Expand Up @@ -81,5 +83,3 @@ if exists('g:terraform_commentstring')
else
setlocal commentstring=#%s
endif

endif
8 changes: 4 additions & 4 deletions after/ftplugin/yaml.vim
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'yaml') != -1
finish
endif

" Vim indent file
" Language: Yaml
" Author: Henrique Barcelos
" Date: 2014-10-08
" URL: https://github.com/hjpbarcelos
setlocal autoindent sw=2 ts=2 expandtab
" vim:set sw=2:

endif
8 changes: 4 additions & 4 deletions after/indent/html.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1

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
Expand Down Expand Up @@ -33,5 +35,3 @@ function! GetCoffeeHtmlIndent(curlinenum)
" Otherwise use html indenting.
exec 'return ' s:htmlIndentExpr
endfunction

endif
8 changes: 4 additions & 4 deletions after/indent/jsx.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
finish
endif

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim indent file
"
Expand Down Expand Up @@ -114,5 +116,3 @@ fu! GetJsxIndent()

return ind
endfu

endif
8 changes: 4 additions & 4 deletions after/indent/objc.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'objc') != -1
finish
endif

" Vim indent file
" Language: Objective-C
" Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
Expand Down Expand Up @@ -93,5 +95,3 @@ endfunction
" Restore 'cpo' options
let &cpo = s:save_cpo
unlet s:save_cpo

endif
8 changes: 4 additions & 4 deletions after/syntax/c.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'c++11') != -1
finish
endif

" Vim syntax file
" Language: C Additions
" Maintainer: Jon Haggblad <jon@haeggblad.com>
Expand Down Expand Up @@ -304,5 +306,3 @@ hi def link cBoolean Boolean
"hi def link cDelimiter Delimiter
" foldmethod=syntax fix, courtesy of Ivan Freitas
"hi def link cBraces Delimiter

endif
8 changes: 4 additions & 4 deletions after/syntax/coffee.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'cjsx') != -1
finish
endif

if exists('b:current_syntax')
let s:current_syntax=b:current_syntax
unlet b:current_syntax
Expand Down Expand Up @@ -27,5 +29,3 @@ hi def link cjsxTagName Function
hi def link cjsxEntity Statement
hi def link cjsxEntityPunct Type
hi def link cjsxAttribProperty Type

endif
8 changes: 4 additions & 4 deletions after/syntax/cpp.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'c++11') != -1
finish
endif

" Vim syntax file
" Language: C++ Additions
" Maintainer: Jon Haggblad <jon@haeggblad.com>
Expand Down Expand Up @@ -2092,5 +2094,3 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppRawDelimiter Delimiter
delcommand HiLink
endif

endif
8 changes: 4 additions & 4 deletions after/syntax/haml.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1

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
Expand All @@ -23,5 +25,3 @@ if exists('s:current_syntax_save')
let b:current_syntax = s:current_syntax_save
unlet s:current_syntax_save
endif

endif
8 changes: 4 additions & 4 deletions after/syntax/help.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'scala') != -1
finish
endif

" Extends standard help syntax with highlighting of Scala code.
"
" Place code between !sc! and !/sc! delimiters. These will be hidden if Vim is
Expand All @@ -14,5 +16,3 @@ if has('conceal')
else
syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode
endif

endif
26 changes: 13 additions & 13 deletions after/syntax/html.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1

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
Expand All @@ -20,10 +22,10 @@ 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
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1


" Language: OpenGL Shading Language
" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io>

Expand All @@ -33,10 +35,10 @@ syn region ShaderScript
\ keepend
\ end="</script>"me=s-1
\ contains=@GLSL,htmlScriptTag,@htmlPreproc

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'html5') != -1
finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1


" Vim syntax file
" Language: HTML (version 5.1)
" Last Change: 2017 Feb 15
Expand All @@ -49,10 +51,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
" 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:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1


if !exists("g:less_html_style_tags")
let g:less_html_style_tags = 1
endif
Expand All @@ -79,5 +81,3 @@ 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
8 changes: 4 additions & 4 deletions after/syntax/javascript/graphql.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'graphql') != -1
finish
endif

if exists('b:current_syntax')
let s:current_syntax = b:current_syntax
unlet b:current_syntax
Expand All @@ -23,5 +25,3 @@ hi def link graphqlTemplateExpression jsTemplateExpression

syn cluster jsExpression add=graphqlTaggedTemplate
syn cluster graphqlTaggedTemplate add=graphqlTemplateString

endif
8 changes: 4 additions & 4 deletions after/syntax/jsx.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'jsx') != -1
finish
endif

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim syntax file
"
Expand Down Expand Up @@ -65,5 +67,3 @@ syn cluster jsExpression add=jsxRegion

" Allow jsxRegion to contain reserved words.
syn cluster javascriptNoReserved add=jsxRegion

endif
8 changes: 4 additions & 4 deletions after/syntax/mma.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'mathematica') != -1
finish
endif

"Vim conceal file
" Language: Mathematica
" Maintainer: R. Menon <rsmenon@icloud.com>
Expand Down Expand Up @@ -103,5 +105,3 @@ endif

hi! link Conceal Normal
setlocal conceallevel=2

endif
8 changes: 4 additions & 4 deletions after/syntax/objc.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'objc') != -1
finish
endif

" ARC type modifiers
syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained

Expand All @@ -19,5 +21,3 @@ syn match objcDirective "@property\|@synthesize\|@dynamic\|@package"

" Highlight property attributes as if they were type modifiers
hi def link objcPropertyAttribute objcTypeModifier

endif
8 changes: 4 additions & 4 deletions after/syntax/rspec.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rspec') != -1
finish
endif

"
" An rspec syntax file
" Originally from http://www.vim.org/scripts/script.php?script_id=2286
Expand Down Expand Up @@ -32,5 +34,3 @@ syntax keyword rspecMessageExpectation advise any_args any_number_of_times anyth
highlight link rspecMessageExpectation Function

let b:current_syntax = 'rspec'

endif
8 changes: 4 additions & 4 deletions after/syntax/ruby.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yard') == -1

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'yard') != -1
finish
endif

" Ruby syntax extensions for highlighting YARD documentation.
"
" Author: Joel Holdbrooks <https://github.com/noprompt>
Expand Down Expand Up @@ -126,5 +128,3 @@ hi def link yardParametricType yardComment
hi def link yardArrow yardComment
hi def link yardHashAngle yardComment
hi def link yardHashCurly yardComment

endif
Loading

0 comments on commit 1597b7b

Please sign in to comment.