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:
parent
892cd49f06
commit
855a88b532
1
init.lua
1
init.lua
@ -43,6 +43,7 @@ for _, file_name in ipairs(core_conf_files) do
|
|||||||
vim.cmd(source_cmd)
|
vim.cmd(source_cmd)
|
||||||
else
|
else
|
||||||
local module_name, _ = string.gsub(file_name, "%.lua", "")
|
local module_name, _ = string.gsub(file_name, "%.lua", "")
|
||||||
|
package.loaded[module_name] = nil
|
||||||
require(module_name)
|
require(module_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user