Fix detecting conf filetype, closes #641

This commit is contained in:
Adam Stankiewicz
2020-12-29 23:40:05 +01:00
parent 47dcae9131
commit 1150adc4db
4 changed files with 15 additions and 10 deletions

View File

@@ -2659,13 +2659,13 @@ func! s:Observe(fn)
augroup END
endfunc
au BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
au BufNewFile,BufRead,StdinReadPost,BufWritePost * if expand("<afile>:e") == "" |
\ call polyglot#shebang#Detect() | endif
au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" |
au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" |
\ call s:Observe('shebang#Detect') | endif
au FileType * au! polyglot-observer
au BufWritePost * au! polyglot-observer
augroup END
@@ -3528,7 +3528,6 @@ if exists("did_load_filetypes") && exists("g:polyglot_disabled")
runtime! extras/filetype.vim
endif
let s:runtime = resolve($VIMRUNTIME)
let s:base = resolve(expand('<sfile>:p:h:h'))