klen / nvim-config-local

Secure load local config files for neovim
MIT License
150 stars 9 forks source link

bug: Only the first `config_files` is sourced. #7

Closed pysan3 closed 1 year ago

pysan3 commented 1 year ago

Hi @klen,

Thanks for the awesome plugin :)

I noticed that when we have both ".vimrc.lua" and ".vimrc" in the same directory, it seems that only the first one in config_files is being sourced.

I think sourcing all files inside config_files is more intuitive.

I think this is caused by M.lookup() only returning the first match here.

Best, pysan3

coffebar commented 1 year ago

I think it s intuitive to prefer lua files for neovim and left vimrc for vim users as alternative, if both files found. conf for vim may be different.

klen commented 1 year ago

@pysan3 I agree with @coffebar and prefer leave the behaviour as is. Why do not use single file per directory for the configuration?

pysan3 commented 1 year ago

No worries, I can live with it. Tho I got a bit confused at first glance cuz I think it's never mentioned in the docs?

I once blindly created config.lua not knowing that there was already a config.vim (which comes before in my list) and took quite a long time to figure out the reason why config.lua was not sourced.

Especially because the do you trust this file? confirmation does get triggered on both files.