New answers tagged

0 votes
Accepted

How to set all files under a folder to a specified filetype?

First of all, nvim-treesitter does not call :filetype off by default. Secondly, :filetype on is enabled by default(:h nvim-defaults). Finally, you can use vim.filetype.add (:h lua-filetype).
1 vote

How to set all files under a folder to a specified filetype?

If you are talking about autoload functions or just scripts, putting a zsh shebang or #compdef at the beginning should work fine for filetype detection. Otherwise, # vim: ft=zsh near the beginning or ...
  • 23.3k
2 votes
Accepted

Do I need to set `:filetype on` myself in Neovim?

From :h filetype-overview Overview: *:filetype-overview* command detection plugin indent ~ :filetype on on unchanged unchanged :...
  • 19.2k

Top 50 recent answers are included