summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-01-01 17:00:28 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2021-01-01 17:00:28 +0100
commit7219196dbae4242f8c9c3bb139cce72fe330ef03 (patch)
tree68fa1bad5403015b96cb6c629779c3dfdff8ace8
parentd6678a1b35f7cb873a6a62c371dcadfc03c8ae0d (diff)
downloadvim-polyglot-7219196dbae4242f8c9c3bb139cce72fe330ef03.tar.gz
vim-polyglot-7219196dbae4242f8c9c3bb139cce72fe330ef03.zip
Improve disabling ftdetect
-rw-r--r--ftdetect/polyglot.vim20
1 files changed, 10 insertions, 10 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 45087f65..113453af 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -14,11 +14,6 @@ let did_load_polyglot = 1
let s:cpo_save = &cpo
set cpo&vim
-" It can happen vim filetype.vim loads first, then we need a reset
-if exists("did_load_filetypes")
- au! filetypedetect
-endif
-
let g:polyglot_is_disabled = {}
let s:new_polyglot_disabled = []
@@ -48,9 +43,6 @@ endfun
au VimEnter * call PolyglotVerify()
-" Prevent filetype.vim of vim from loading again
-let did_load_filetypes = 1
-
" Be consistent across different systems
set nofileignorecase
@@ -142,6 +134,15 @@ set cpo&vim
if !has_key(g:polyglot_is_disabled, 'ftdetect')
+" It can happen vim filetype.vim loads first, then we need a reset
+if exists("did_load_filetypes")
+ au! filetypedetect
+endif
+
+" Prevent filetype.vim of vim from loading again
+let did_load_filetypes = 1
+
+
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
if !has_key(g:polyglot_is_disabled, 'jsonc')
@@ -2657,8 +2658,6 @@ endif
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
-endif
-
func! s:Observe(fn)
let b:PolyglotObserve = function("polyglot#" . a:fn)
augroup polyglot-observer
@@ -2677,6 +2676,7 @@ au BufWritePost * au! polyglot-observer
augroup END
+endif
if !has_key(g:polyglot_is_disabled, 'sensible')
" Use 2-spaces tab indentation by default