Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to autodetect ~/.config/conky/conky.conf as a lua file? #78

Open
vbrand1984 opened this issue Jun 25, 2024 · 1 comment

Comments

@vbrand1984
Copy link

vbrand1984 commented Jun 25, 2024

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.

@alker0
Copy link
Owner

alker0 commented Jul 1, 2024

Making your autocmd rules that detects file type belong in the filetypedetect group could make it work for you because this plugin runs all autocmds only belonging in the filetypedetect group as that should include all autocmds 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants