Set filetype based on custom file extension in neovim
I have created filetype config in below format .config/nvim ├── after │ └── ftplugin │ └── gitconfig-gh.lua And the content is: vim.opt.filetype = 'gitconfig' But still the syntax highlighting with treesitter is not working. It only works when I open the file and set it each time nvim ~/.gitconfig-gh :set filetype=gitconfig Am I missing something here? Is there any other way to set filetype based on extension?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.