summaryrefslogtreecommitdiffstats
path: root/after/indent
diff options
context:
space:
mode:
Diffstat (limited to 'after/indent')
-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
9 files changed, 27 insertions, 27 deletions
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