Is it possible to autodetect ~/.config/conky/conky.conf as a lua file?
Opened this issue · 1 comments
As the title says. I have a templated conky.conf.tmpl, the plugin makes a reasonable suggestion that this is a chezmoi template file, but the truth is, conky config is written in lua, and this should be lua.chezmoitmpl, as far as I get it.
After enabling this plugin, my own makeshift autocmd
rules in vimrc
cease to work, alas.
Making your autocmd
rules that detects file type belong in the filetypedetect
group could make it work for you because this plugin runs all autocmd
s only belonging in the filetypedetect
group as that should include all autocmd
s that detects file type.
For example, editing your .vimrc
or .vim/vimrc
as follows should fix it:
"autocmd BufRead,BufNewFile *conky.conf setlocal filetype=lua
augroup filetypedetect
autocmd! BufRead,BufNewFile *conky.conf setfiletype lua
augroup END
Or making .vim/filetype.vim
with these contents this should also work:
if exists('did_load_filetypes')
finish
endif
augroup filetypedetect
autocmd! BufRead,BufNewFile *conky.conf setfiletype lua
augroup END
You can see more details at vimhelp.org.