vim-polyglot
vim-polyglot copied to clipboard
gitconfig ftdetect interferes with netrw
Create directory
cd /tmp
mkdir gitconfig
vim .
Open in netrw
" Netrw Directory Listing (netrw v171)
" /tmp
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special
" ==============================================================================
../
./
gitconfig/ ← open this
Result
Filetype in netrw changes from netrw to gitconfig, clearing the syntax highlighting.
This does not happen without vim-polyglot, so it's probably down to the more aggressive filetype detection, which I love 99% of the time.
This is a niche case, so if it's painful to fix then feel free to close this issue. I just wanted to share it, since it baffled me for a moment.