1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

fix: user lua conf reloading fails

The cache should be invalidated. This fix does not work 100%, because, e.g.,
there are other configs hiding deeper under lua/config/ directory.
A restart is the best way to reload the config.
This commit is contained in:
jdhao 2023-07-29 14:31:51 +02:00
parent 892cd49f06
commit 855a88b532

View File

@ -43,6 +43,7 @@ for _, file_name in ipairs(core_conf_files) do
vim.cmd(source_cmd)
else
local module_name, _ = string.gsub(file_name, "%.lua", "")
package.loaded[module_name] = nil
require(module_name)
end
end