summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-04 14:18:37 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-04 14:18:37 +0200
commit4df00e657481fa77c129acdda4d2b367cf64afab (patch)
treebeaff0aabfa62dc6e4fc17971dd733381cc08a1a /plugin
parent48f59577c8fa68d85ac73bfd9f257d606c4660b5 (diff)
downloadvim-polyglot-4df00e657481fa77c129acdda4d2b367cf64afab.tar.gz
vim-polyglot-4df00e657481fa77c129acdda4d2b367cf64afab.zip
Allow to disable autoindent with g:polyglot_disabled
Diffstat (limited to 'plugin')
-rw-r--r--plugin/sleuth.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/sleuth.vim b/plugin/sleuth.vim
index 12086173..d7b9b773 100644
--- a/plugin/sleuth.vim
+++ b/plugin/sleuth.vim
@@ -7,10 +7,15 @@
" - check maximum of files 2 per directory level instead of 8
" - maximum of 3 directory levels are checked
" - globs are concatenated for performance
+" - tabstop setting is not configured, it's up to user
+if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'autoindent') != -1
+ finish
+endif
-if exists("g:loaded_sleuth") || v:version < 700 || &cp
+if exists("g:loaded_sleuth") || exists("g:polyglot_disabled") || v:version < 700 || &cp
finish
endif
+
let g:loaded_sleuth = 1
function! s:guess(lines) abort