summaryrefslogtreecommitdiffstats
path: root/after
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-25 03:19:58 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-25 03:19:58 +0100
commitcbde2571d4f79770ac552fe75440de72893bc73a (patch)
treec6bf43ecbf9ed76071713dc4cba028d32695987a /after
parentd73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (diff)
downloadvim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.tar.gz
vim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.zip
Respect symlinks for resolving vim-polyglot as fallback, closes #605
Diffstat (limited to 'after')
-rw-r--r--after/ftplugin/cabal.vim6
-rw-r--r--after/ftplugin/coffee.vim6
-rw-r--r--after/ftplugin/haskell.vim6
-rw-r--r--after/ftplugin/html.vim6
-rw-r--r--after/ftplugin/idris.vim6
-rw-r--r--after/ftplugin/idris2.vim6
-rw-r--r--after/ftplugin/javascript-1.vim6
-rw-r--r--after/ftplugin/javascript-2.vim6
-rw-r--r--after/ftplugin/javascriptreact.vim6
-rw-r--r--after/ftplugin/jsx.vim6
-rw-r--r--after/ftplugin/llvm.vim6
-rw-r--r--after/ftplugin/puppet.vim6
-rw-r--r--after/ftplugin/tsx.vim6
-rw-r--r--after/ftplugin/typescriptreact.vim6
-rw-r--r--after/indent/html.vim6
-rw-r--r--after/indent/javascript-1.vim6
-rw-r--r--after/indent/javascript-2.vim6
-rw-r--r--after/indent/javascriptreact.vim6
-rw-r--r--after/indent/jsx.vim6
-rw-r--r--after/indent/objc.vim6
-rw-r--r--after/indent/tsx.vim6
-rw-r--r--after/indent/typescript.vim6
-rw-r--r--after/indent/typescriptreact.vim6
-rw-r--r--after/syntax/c.vim6
-rw-r--r--after/syntax/coffee.vim6
-rw-r--r--after/syntax/cpp.vim6
-rw-r--r--after/syntax/haskell.vim6
-rw-r--r--after/syntax/help.vim6
-rw-r--r--after/syntax/html.vim6
-rw-r--r--after/syntax/html/aria.vim6
-rw-r--r--after/syntax/html/electron.vim6
-rw-r--r--after/syntax/html/rdfa.vim6
-rw-r--r--after/syntax/idris.vim6
-rw-r--r--after/syntax/idris2.vim6
-rw-r--r--after/syntax/javascript.vim6
-rw-r--r--after/syntax/javascript/graphql.vim6
-rw-r--r--after/syntax/javascript/html5.vim6
-rw-r--r--after/syntax/javascript/sql.vim6
-rw-r--r--after/syntax/javascriptreact.vim6
-rw-r--r--after/syntax/javascriptreact/graphql.vim6
-rw-r--r--after/syntax/jsx.vim6
-rw-r--r--after/syntax/jsx_pretty.vim6
-rw-r--r--after/syntax/llvm.vim6
-rw-r--r--after/syntax/mdx.vim6
-rw-r--r--after/syntax/mma.vim6
-rw-r--r--after/syntax/objc.vim6
-rw-r--r--after/syntax/reason.vim6
-rw-r--r--after/syntax/reason/graphql.vim6
-rw-r--r--after/syntax/rspec.vim6
-rw-r--r--after/syntax/ruby.vim6
-rw-r--r--after/syntax/rust.vim6
-rw-r--r--after/syntax/tsx.vim6
-rw-r--r--after/syntax/typescript/graphql.vim6
-rw-r--r--after/syntax/typescriptreact.vim6
-rw-r--r--after/syntax/typescriptreact/graphql.vim6
-rw-r--r--after/syntax/vue/graphql.vim6
-rw-r--r--after/syntax/zsh.vim6
57 files changed, 171 insertions, 171 deletions
diff --git a/after/ftplugin/cabal.vim b/after/ftplugin/cabal.vim
index 8009502d..461f6a24 100644
--- a/after/ftplugin/cabal.vim
+++ b/after/ftplugin/cabal.vim
@@ -1,7 +1,7 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
+if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p'))
+ finish
+endif
setlocal comments=s1fl:{-,mb:-,ex:-},:--
setlocal iskeyword+=-,.,*
setlocal commentstring=--\ %s
-
-endif
diff --git a/after/ftplugin/coffee.vim b/after/ftplugin/coffee.vim
index 27c00bcb..a039dd95 100644
--- a/after/ftplugin/coffee.vim
+++ b/after/ftplugin/coffee.vim
@@ -1,9 +1,9 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1
+if !polyglot#util#IsEnabled('cjsx', expand('<sfile>:p'))
+ finish
+endif
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 a617329c..96ea4d04 100644
--- a/after/ftplugin/haskell.vim
+++ b/after/ftplugin/haskell.vim
@@ -1,6 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
+if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p'))
+ finish
+endif
setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--
setlocal iskeyword+='
-
-endif
diff --git a/after/ftplugin/html.vim b/after/ftplugin/html.vim
index 50cdb2ae..6b0b48a2 100644
--- a/after/ftplugin/html.vim
+++ b/after/ftplugin/html.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Maintainer: othree <othree@gmail.com>
" URL: http://github.com/othree/html5.vim
@@ -9,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
" setlocal iskeyword+=-
setlocal commentstring=<!--%s-->
-
-endif
diff --git a/after/ftplugin/idris.vim b/after/ftplugin/idris.vim
index 6c6815d5..4b38f4ce 100644
--- a/after/ftplugin/idris.vim
+++ b/after/ftplugin/idris.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1
+if !polyglot#util#IsEnabled('idris', expand('<sfile>:p'))
+ finish
+endif
setlocal iskeyword+='
-
-endif
diff --git a/after/ftplugin/idris2.vim b/after/ftplugin/idris2.vim
index b96ae5b6..b7f25573 100644
--- a/after/ftplugin/idris2.vim
+++ b/after/ftplugin/idris2.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1
+if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p'))
+ finish
+endif
setlocal iskeyword+='
-
-endif
diff --git a/after/ftplugin/javascript-1.vim b/after/ftplugin/javascript-1.vim
index 9f6c9314..8480c6e7 100644
--- a/after/ftplugin/javascript-1.vim
+++ b/after/ftplugin/javascript-1.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
+if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p'))
+ finish
+endif
" Vim filetype plugin file
" Language: JavaScript
@@ -12,5 +14,3 @@ if exists('b:undo_ftplugin')
else
let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<'
endif
-
-endif
diff --git a/after/ftplugin/javascript-2.vim b/after/ftplugin/javascript-2.vim
index 2992e942..f56dd82a 100644
--- a/after/ftplugin/javascript-2.vim
+++ b/after/ftplugin/javascript-2.vim
@@ -1,9 +1,9 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
if get(g:, 'vim_jsx_pretty_disable_js', 0)
finish
endif
source <sfile>:h/jsx.vim
-
-endif
diff --git a/after/ftplugin/javascriptreact.vim b/after/ftplugin/javascriptreact.vim
index 265415d0..be2ea1fc 100644
--- a/after/ftplugin/javascriptreact.vim
+++ b/after/ftplugin/javascriptreact.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
source <sfile>:h/jsx.vim
-
-endif
diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim
index 94f90c13..f6f07131 100644
--- a/after/ftplugin/jsx.vim
+++ b/after/ftplugin/jsx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim ftplugin file
@@ -31,5 +33,3 @@ augroup jsx_comment
augroup end
setlocal suffixesadd+=.jsx
-
-endif
diff --git a/after/ftplugin/llvm.vim b/after/ftplugin/llvm.vim
index fbd4b7ff..192bf2f5 100644
--- a/after/ftplugin/llvm.vim
+++ b/after/ftplugin/llvm.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
+if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2018 rhysd
"
@@ -483,5 +485,3 @@ endfunction
if !exists(':LLI')
command! -buffer -nargs=? -bar -complete=file LLI call <SID>run_lli(<f-args>)
endif
-
-endif
diff --git a/after/ftplugin/puppet.vim b/after/ftplugin/puppet.vim
index 6ddb64e0..8cbc9972 100644
--- a/after/ftplugin/puppet.vim
+++ b/after/ftplugin/puppet.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1
+if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p'))
+ finish
+endif
if !exists('g:puppet_align_hashes')
let g:puppet_align_hashes = 1
@@ -7,5 +9,3 @@ endif
if g:puppet_align_hashes
inoremap <buffer> <silent> => =><Esc>:call puppet#align#AlignHashrockets()<CR>$a
endif
-
-endif
diff --git a/after/ftplugin/tsx.vim b/after/ftplugin/tsx.vim
index 96b5515a..2b35ec46 100644
--- a/after/ftplugin/tsx.vim
+++ b/after/ftplugin/tsx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
" modified from html.vim
" For matchit plugin
@@ -28,5 +30,3 @@ augroup jsx_comment
augroup end
setlocal suffixesadd+=.tsx
-
-endif
diff --git a/after/ftplugin/typescriptreact.vim b/after/ftplugin/typescriptreact.vim
index 3d850291..07de9bb7 100644
--- a/after/ftplugin/typescriptreact.vim
+++ b/after/ftplugin/typescriptreact.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
source <sfile>:h/tsx.vim
-
-endif
diff --git a/after/indent/html.vim b/after/indent/html.vim
index 3b9c7eb4..065106ca 100644
--- a/after/indent/html.vim
+++ b/after/indent/html.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Vim indent script for HTML
" Header: "{{{
@@ -1060,5 +1062,3 @@ let &cpo = s:cpo_save
unlet s:cpo_save
" vim: fdm=marker ts=8 sw=2 tw=78
-
-endif
diff --git a/after/indent/javascript-1.vim b/after/indent/javascript-1.vim
index 2992e942..f56dd82a 100644
--- a/after/indent/javascript-1.vim
+++ b/after/indent/javascript-1.vim
@@ -1,9 +1,9 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
if get(g:, 'vim_jsx_pretty_disable_js', 0)
finish
endif
source <sfile>:h/jsx.vim
-
-endif
diff --git a/after/indent/javascript-2.vim b/after/indent/javascript-2.vim
index 85e52312..24d29703 100644
--- a/after/indent/javascript-2.vim
+++ b/after/indent/javascript-2.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
@@ -42,5 +44,3 @@ function GetJavascriptGraphQLIndent()
return eval(b:indentexpr_base)
endfunction
-
-endif
diff --git a/after/indent/javascriptreact.vim b/after/indent/javascriptreact.vim
index 265415d0..be2ea1fc 100644
--- a/after/indent/javascriptreact.vim
+++ b/after/indent/javascriptreact.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
source <sfile>:h/jsx.vim
-
-endif
diff --git a/after/indent/jsx.vim b/after/indent/jsx.vim
index fcd7b5ad..394f20b7 100644
--- a/after/indent/jsx.vim
+++ b/after/indent/jsx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim indent file
@@ -29,5 +31,3 @@ endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
-
-endif
diff --git a/after/indent/objc.vim b/after/indent/objc.vim
index 081e7033..ee644861 100644
--- a/after/indent/objc.vim
+++ b/after/indent/objc.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1
+if !polyglot#util#IsEnabled('objc', expand('<sfile>:p'))
+ finish
+endif
" Vim indent file
" Language: Objective-C
@@ -93,5 +95,3 @@ endfunction
" Restore 'cpo' options
let &cpo = s:save_cpo
unlet s:save_cpo
-
-endif
diff --git a/after/indent/tsx.vim b/after/indent/tsx.vim
index 13312c03..544568a7 100644
--- a/after/indent/tsx.vim
+++ b/after/indent/tsx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim indent file
@@ -36,5 +38,3 @@ endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
-
-endif
diff --git a/after/indent/typescript.vim b/after/indent/typescript.vim
index 45ef3492..8f0172c1 100644
--- a/after/indent/typescript.vim
+++ b/after/indent/typescript.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
@@ -42,5 +44,3 @@ function GetTypescriptGraphQLIndent()
return eval(b:indentexpr_base)
endfunction
-
-endif
diff --git a/after/indent/typescriptreact.vim b/after/indent/typescriptreact.vim
index 3d850291..07de9bb7 100644
--- a/after/indent/typescriptreact.vim
+++ b/after/indent/typescriptreact.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
source <sfile>:h/tsx.vim
-
-endif
diff --git a/after/syntax/c.vim b/after/syntax/c.vim
index 80501e19..d0478e01 100644
--- a/after/syntax/c.vim
+++ b/after/syntax/c.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') == -1
+if !polyglot#util#IsEnabled('cpp-modern', expand('<sfile>:p'))
+ finish
+endif
" ==============================================================================
" Vim syntax file
@@ -66,5 +68,3 @@ if get(g:, 'cpp_simple_highlight', 0)
hi link cTypedef Statement
hi link cLabel Statement
endif
-
-endif
diff --git a/after/syntax/coffee.vim b/after/syntax/coffee.vim
index fde51eb4..9b9f38a3 100644
--- a/after/syntax/coffee.vim
+++ b/after/syntax/coffee.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1
+if !polyglot#util#IsEnabled('cjsx', expand('<sfile>:p'))
+ finish
+endif
if exists('b:current_syntax')
let s:current_syntax=b:current_syntax
@@ -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
diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim
index ec3f1fcf..b59b9859 100644
--- a/after/syntax/cpp.vim
+++ b/after/syntax/cpp.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') == -1
+if !polyglot#util#IsEnabled('cpp-modern', expand('<sfile>:p'))
+ finish
+endif
" ==============================================================================
" Vim syntax file
@@ -208,5 +210,3 @@ if get(g:, 'cpp_simple_highlight', 0)
hi link cppExceptions Statement
hi link cppStorageClass Statement
endif
-
-endif
diff --git a/after/syntax/haskell.vim b/after/syntax/haskell.vim
index ac175298..e109b2d7 100644
--- a/after/syntax/haskell.vim
+++ b/after/syntax/haskell.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1
+if !polyglot#util#IsEnabled('dhall', expand('<sfile>:p'))
+ finish
+endif
" store and remove current syntax value
let old_syntax = b:current_syntax
@@ -13,5 +15,3 @@ hi def link quasiQuote Underlined
" restore current syntax value
let b:current_syntax = old_syntax
-
-endif
diff --git a/after/syntax/help.vim b/after/syntax/help.vim
index 16c46b29..a43546cf 100644
--- a/after/syntax/help.vim
+++ b/after/syntax/help.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1
+if !polyglot#util#IsEnabled('scala', expand('<sfile>:p'))
+ finish
+endif
" Extends standard help syntax with highlighting of Scala code.
"
@@ -14,5 +16,3 @@ 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 c02c02a3..8bdc0b0f 100644
--- a/after/syntax/html.vim
+++ b/after/syntax/html.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Vim syntax file
" Language: HTML (version 5.1)
@@ -196,5 +198,3 @@ syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffs
" https://github.com/w3c/html/issues/694
syntax region htmlComment start=+<!--+ end=+-->+ contains=@Spell
syntax region htmlComment start=+<!DOCTYPE+ keepend end=+>+
-
-endif
diff --git a/after/syntax/html/aria.vim b/after/syntax/html/aria.vim
index 0c555e6e..9e457bff 100644
--- a/after/syntax/html/aria.vim
+++ b/after/syntax/html/aria.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Vim syntax file
" Language: WAI-ARIA
@@ -75,5 +77,3 @@ syn match htmlArg contained "\<aria-\%(\|labelledby\|owns\|posinset\|setsize\
syn match htmlArg contained "\<aria-\%(\|colcount\|colindex\|colspan\)\>"
syn match htmlArg contained "\<aria-\%(\|rowcount\|rowindex\|rowspan\)\>"
-
-endif
diff --git a/after/syntax/html/electron.vim b/after/syntax/html/electron.vim
index f51e1aef..636e810d 100644
--- a/after/syntax/html/electron.vim
+++ b/after/syntax/html/electron.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Vim syntax file
" Language: Electron
@@ -15,5 +17,3 @@ syn keyword htmlArg contained useragent disablewebsecurity partition allowpopups
syn keyword htmlArg contained webpreferences blinkfeatures disableblinkfeatures
syn keyword htmlArg contained guestinstance disableguestresize
-
-endif
diff --git a/after/syntax/html/rdfa.vim b/after/syntax/html/rdfa.vim
index d772d43c..ec7d714b 100644
--- a/after/syntax/html/rdfa.vim
+++ b/after/syntax/html/rdfa.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Vim syntax file
" Language: RDFa
@@ -11,5 +13,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
" RDFa
" http://www.w3.org/TR/rdfa-syntax/#s_syntax
syn keyword htmlArg contained about content datatype href inlist prefix property rel resource rev src typeof vocab
-
-endif
diff --git a/after/syntax/idris.vim b/after/syntax/idris.vim
index 29d35632..01f5000e 100644
--- a/after/syntax/idris.vim
+++ b/after/syntax/idris.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1
+if !polyglot#util#IsEnabled('idris', expand('<sfile>:p'))
+ finish
+endif
" This script allows for unicode concealing of certain characters
" For instance -> goes to →
@@ -78,5 +80,3 @@ hi link idrNiceOperator Operator
hi! link Conceal Operator
setlocal conceallevel=2
-
-endif
diff --git a/after/syntax/idris2.vim b/after/syntax/idris2.vim
index 85f674a9..279e5875 100644
--- a/after/syntax/idris2.vim
+++ b/after/syntax/idris2.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1
+if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p'))
+ finish
+endif
" This script allows for unicode concealing of certain characters
" For instance -> goes to →
@@ -78,5 +80,3 @@ hi link idrNiceOperator Operator
hi! link Conceal Operator
setlocal conceallevel=2
-
-endif
diff --git a/after/syntax/javascript.vim b/after/syntax/javascript.vim
index 2992e942..f56dd82a 100644
--- a/after/syntax/javascript.vim
+++ b/after/syntax/javascript.vim
@@ -1,9 +1,9 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
if get(g:, 'vim_jsx_pretty_disable_js', 0)
finish
endif
source <sfile>:h/jsx.vim
-
-endif
diff --git a/after/syntax/javascript/graphql.vim b/after/syntax/javascript/graphql.vim
index 22557862..c0c73742 100644
--- a/after/syntax/javascript/graphql.vim
+++ b/after/syntax/javascript/graphql.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
@@ -60,5 +62,3 @@ elseif graphql#has_syntax_group('javaScriptStringT')
syn cluster javaScriptEmbededExpr add=graphqlTaggedTemplate
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
endif
-
-endif
diff --git a/after/syntax/javascript/html5.vim b/after/syntax/javascript/html5.vim
index 42ab78ad..eaeaccb5 100644
--- a/after/syntax/javascript/html5.vim
+++ b/after/syntax/javascript/html5.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
+if !polyglot#util#IsEnabled('html5', expand('<sfile>:p'))
+ finish
+endif
" Vim syntax file
" Language: HTML5 New Stuff
@@ -49,5 +51,3 @@ syn keyword javascriptDomElemAttrs indeterminate
" select https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
syn keyword javascriptDomElemAttrs onselectstart onselectchange
-
-endif
diff --git a/after/syntax/javascript/sql.vim b/after/syntax/javascript/sql.vim
index 8b45203c..58e23b56 100644
--- a/after/syntax/javascript/sql.vim
+++ b/after/syntax/javascript/sql.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript-sql') == -1
+if !polyglot#util#IsEnabled('javascript-sql', expand('<sfile>:p'))
+ finish
+endif
" Vim plugin
" Language: JavaScript
@@ -22,5 +24,3 @@ hi def link sqlTaggedTemplate jsTaggedTemplate
syn cluster jsExpression add=sqlTaggedTemplate
syn cluster sqlTaggedTemplate add=sqlTemplateString
-
-endif
diff --git a/after/syntax/javascriptreact.vim b/after/syntax/javascriptreact.vim
index 265415d0..be2ea1fc 100644
--- a/after/syntax/javascriptreact.vim
+++ b/after/syntax/javascriptreact.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
source <sfile>:h/jsx.vim
-
-endif
diff --git a/after/syntax/javascriptreact/graphql.vim b/after/syntax/javascriptreact/graphql.vim
index c86f9d23..52628a1a 100644
--- a/after/syntax/javascriptreact/graphql.vim
+++ b/after/syntax/javascriptreact/graphql.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
runtime! after/syntax/javascript/graphql.vim
-
-endif
diff --git a/after/syntax/jsx.vim b/after/syntax/jsx.vim
index 00c4b079..0a7a7e1e 100644
--- a/after/syntax/jsx.vim
+++ b/after/syntax/jsx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim syntax file
@@ -55,5 +57,3 @@ let b:current_syntax = 'javascript.jsx'
let &cpo = s:jsx_cpo
unlet s:jsx_cpo
-
-endif
diff --git a/after/syntax/jsx_pretty.vim b/after/syntax/jsx_pretty.vim
index 9f14e4d4..f05969c5 100644
--- a/after/syntax/jsx_pretty.vim
+++ b/after/syntax/jsx_pretty.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
@@ -221,5 +223,3 @@ if s:vim_jsx_pretty_colorful_config == 1
highlight def link jsArrowFuncArgs Type
highlight def link jsFuncArgs Type
endif
-
-endif
diff --git a/after/syntax/llvm.vim b/after/syntax/llvm.vim
index 04d234a2..6f3daebf 100644
--- a/after/syntax/llvm.vim
+++ b/after/syntax/llvm.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
+if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2018 rhysd
"
@@ -22,5 +24,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
syn keyword llvmKeyword attributes
syn match llvmNoName /#\d\+\>/
-
-endif
diff --git a/after/syntax/mdx.vim b/after/syntax/mdx.vim
index 5538f881..6fd7b963 100644
--- a/after/syntax/mdx.vim
+++ b/after/syntax/mdx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mdx') == -1
+if !polyglot#util#IsEnabled('mdx', expand('<sfile>:p'))
+ finish
+endif
" based on mxw/vim-jsx
@@ -41,5 +43,3 @@ syn cluster jsExpression add=jsxRegion
" Allow jsxRegion to contain reserved words.
syn cluster javascriptNoReserved add=jsxRegion
-
-endif
diff --git a/after/syntax/mma.vim b/after/syntax/mma.vim
index c01de4d0..24d99755 100644
--- a/after/syntax/mma.vim
+++ b/after/syntax/mma.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1
+if !polyglot#util#IsEnabled('mathematica', expand('<sfile>:p'))
+ finish
+endif
"Vim conceal file
" Language: Mathematica
@@ -1442,5 +1444,3 @@ endif
hi! link Conceal Normal
setlocal conceallevel=2
-
-endif
diff --git a/after/syntax/objc.vim b/after/syntax/objc.vim
index 093688b1..0541758d 100644
--- a/after/syntax/objc.vim
+++ b/after/syntax/objc.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1
+if !polyglot#util#IsEnabled('objc', expand('<sfile>:p'))
+ finish
+endif
" ARC type modifiers
syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained
@@ -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
diff --git a/after/syntax/reason.vim b/after/syntax/reason.vim
index 3be39690..f608bde1 100644
--- a/after/syntax/reason.vim
+++ b/after/syntax/reason.vim
@@ -1,4 +1,4 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1
-
-
+if !polyglot#util#IsEnabled('reason', expand('<sfile>:p'))
+ finish
endif
+
diff --git a/after/syntax/reason/graphql.vim b/after/syntax/reason/graphql.vim
index 4f4ba44c..00fe9b5d 100644
--- a/after/syntax/reason/graphql.vim
+++ b/after/syntax/reason/graphql.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
@@ -33,5 +35,3 @@ if exists('s:current_syntax')
endif
syntax region graphqlExtensionPoint matchgroup=Noise start=+\[%graphql\_s*{|+lc=10 end=+|}\_s*]+he=s+1 contains=@GraphQLSyntax keepend
-
-endif
diff --git a/after/syntax/rspec.vim b/after/syntax/rspec.vim
index 96ceb28f..99905ddd 100644
--- a/after/syntax/rspec.vim
+++ b/after/syntax/rspec.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1
+if !polyglot#util#IsEnabled('rspec', expand('<sfile>:p'))
+ finish
+endif
"
" An rspec syntax file
@@ -189,5 +191,3 @@ highlight link rspecMatchers Function
highlight link rspecMessageExpectation Function
let b:current_syntax = 'rspec'
-
-endif
diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim
index 78503c94..e57c1d70 100644
--- a/after/syntax/ruby.vim
+++ b/after/syntax/ruby.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yard') == -1
+if !polyglot#util#IsEnabled('yard', expand('<sfile>:p'))
+ finish
+endif
" Ruby syntax extensions for highlighting YARD documentation.
"
@@ -127,5 +129,3 @@ 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 0a54e2fc..bf17e031 100644
--- a/after/syntax/rust.vim
+++ b/after/syntax/rust.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
+if !polyglot#util#IsEnabled('rust', expand('<sfile>:p'))
+ finish
+endif
scriptencoding utf-8
@@ -41,5 +43,3 @@ if !get(g:, 'rust_conceal_mod_path', 0)
endif
" vim: set et sw=4 sts=4 ts=8:
-
-endif
diff --git a/after/syntax/tsx.vim b/after/syntax/tsx.vim
index 34a6005e..d400f410 100644
--- a/after/syntax/tsx.vim
+++ b/after/syntax/tsx.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim syntax file
@@ -59,5 +61,3 @@ let b:current_syntax = 'typescript.tsx'
let &cpo = s:jsx_cpo
unlet s:jsx_cpo
-
-endif
diff --git a/after/syntax/typescript/graphql.vim b/after/syntax/typescript/graphql.vim
index 5dd01e28..40425b89 100644
--- a/after/syntax/typescript/graphql.vim
+++ b/after/syntax/typescript/graphql.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
@@ -45,5 +47,3 @@ hi def link graphqlTemplateExpression typescriptTemplateSubstitution
syn cluster typescriptExpression add=graphqlTaggedTemplate
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
-
-endif
diff --git a/after/syntax/typescriptreact.vim b/after/syntax/typescriptreact.vim
index 3d850291..07de9bb7 100644
--- a/after/syntax/typescriptreact.vim
+++ b/after/syntax/typescriptreact.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)
+if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p'))
+ finish
+endif
source <sfile>:h/tsx.vim
-
-endif
diff --git a/after/syntax/typescriptreact/graphql.vim b/after/syntax/typescriptreact/graphql.vim
index 62604d20..f9e7151f 100644
--- a/after/syntax/typescriptreact/graphql.vim
+++ b/after/syntax/typescriptreact/graphql.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
runtime! after/syntax/typescript/graphql.vim
-
-endif
diff --git a/after/syntax/vue/graphql.vim b/after/syntax/vue/graphql.vim
index c86f9d23..52628a1a 100644
--- a/after/syntax/vue/graphql.vim
+++ b/after/syntax/vue/graphql.vim
@@ -1,5 +1,5 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
+if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p'))
+ finish
+endif
runtime! after/syntax/javascript/graphql.vim
-
-endif
diff --git a/after/syntax/zsh.vim b/after/syntax/zsh.vim
index 30f93b63..5e9ff75c 100644
--- a/after/syntax/zsh.vim
+++ b/after/syntax/zsh.vim
@@ -1,4 +1,6 @@
-if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zinit') == -1
+if !polyglot#util#IsEnabled('zinit', expand('<sfile>:p'))
+ finish
+endif
" Copyright (c) 2019 Sebastian Gniazdowski
"
@@ -122,5 +124,3 @@ highlight def link ZinitSnippetUrl2 Macro
highlight def link ZinitSnippetUrl3 Macro
highlight def link ZinitSnippetUrl4 Macro
highlight def link ZinitTrailingWhiteSpace Error
-
-endif