I usually put the local config file inside a sub directory like ./.vim/local.vim.
However, adding this path to config_files will result in an error as follows,
It would be really nice if the plugin could find files inside subdirectories.
This is caused by line 66 in init.lua where vim.fn.fnamemodify(filename, ":t") only returns the filename (i.e. local.vim) which is not included in the config_files.
A possible fix would be to change the argument from ":t" to ":~:." which returns the filename relative to the current directory.
:h filename-modifiers
:~ Reduce file name to be relative to the home directory, if
possible. File name is unmodified if it is not below the home
directory.
:. Reduce file name to be relative to current directory, if
possible. File name is unmodified if it is not below the
current directory, but on MS-Windows the drive is removed if
it is the current drive.
For maximum shortness, use ":~:.".
And this change can be done to the following three lines.
Hi @klen,
Thanks for the awesome plugin :)
I usually put the local config file inside a sub directory like
./.vim/local.vim
. However, adding this path to config_files will result in an error as follows,It would be really nice if the plugin could find files inside subdirectories.
This is caused by line 66 in init.lua where
vim.fn.fnamemodify(filename, ":t")
only returns the filename (i.e.local.vim
) which is not included in the config_files.A possible fix would be to change the argument from
":t"
to":~:."
which returns the filename relative to the current directory.And this change can be done to the following three lines.
Best, pysan3