diff options
Diffstat (limited to 'after/syntax')
34 files changed, 102 insertions, 102 deletions
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 |