vim-polyglot icon indicating copy to clipboard operation
vim-polyglot copied to clipboard

[filetype.lua] Incompatible with neovim filetype.lua

Open hiberabyss opened this issue 3 years ago • 4 comments

Does this bug happen when you install plugin without vim-polyglot?

Describe the bug:

When polyglot.vim enabled, the neovim filetype.lua not worked. May related with filetypedetect autogroup.

To Reproduce:

hiberabyss avatar Apr 24 '22 07:04 hiberabyss

Does anyone know of a workaround for this or should I just use treesitter?

shyun3 avatar Sep 02 '22 00:09 shyun3

Could disable polyplot filetype detect via:

let g:polyglot_disabled = [
      \ 'ftdetect',
      \ ]

hiberabyss avatar Sep 02 '22 12:09 hiberabyss

This didn't work for me.

shyun3 avatar Sep 02 '22 17:09 shyun3

Ok, I think I found a way. The ftdetect doesn't need to be disabled. Only the variable g:did_load_filetypes needs to be removed after vim-polyglot is loaded:

call plug#begin()

Plug 'sheerun/vim-polyglot'

call plug#end()

unlet g:did_load_filetypes

I don't know what other consequences this might have.

shyun3 avatar Sep 03 '22 00:09 shyun3