filetype.nvim
filetype.nvim copied to clipboard
Not all .lock files are toml, only Cargo.lock
I was setting up vim-bundler and was struggling to figure out why it kept treating my Gemfile.lock as toml, even though the package includes its own syntax and filetype. I filed https://github.com/tpope/vim-bundler/issues/55 about it.
After some digging, it lead me to https://github.com/nathom/filetype.nvim/blob/b522628a45a17d58fc0073ffd64f9dc9530a8027/lua/filetype/mappings/extensions.lua#L304
Compare this to filetypes.nvim:
au BufNewFile,BufRead Cargo.lock,*/.cargo/config,*/.cargo/credentials setf toml
I disabled filetype.nvim, and it started working.