Skip to content

Commit 2234f0d

Browse files
heftigda-x
authored andcommitted
ftdetect: Use setf FALLBACK to set Cargo.toml filetype (#311)
vim-toml recently started using `setf`.[1] As a result, the filetype set by rust.vim is no longer overridden. Use `setf FALLBACK` as this is the proper mechanism for uncertain filetypes. [1]: cespare/vim-toml@d257faa
1 parent 9ad74f3 commit 2234f0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ftdetect/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" vint: -ProhibitAutocmdWithNoGroup
22

33
autocmd BufRead,BufNewFile *.rs setf rust
4-
autocmd BufRead,BufNewFile Cargo.toml if &filetype == "" | set filetype=cfg | endif
4+
autocmd BufRead,BufNewFile Cargo.toml setf FALLBACK cfg
55

66
" vim: set et sw=4 sts=4 ts=8:

0 commit comments

Comments
 (0)