feat(utils): CosmicReload will recompile

This commit is contained in:
Matt Leong 2021-11-22 15:12:05 -08:00
parent 7c0be72d08
commit bc79ee19e3

View file

@ -91,11 +91,12 @@ function M.reload_user_config_sync()
vim.cmd(':PackerSync')
end
function M.reload_user_config(notify)
notify = notify or false
function M.reload_user_config(compile)
compile = compile or false
unload('cosmic.config', true)
if notify then
M.post_reload()
if compile then
vim.cmd([[autocmd User PackerCompileDone ++once lua require('cosmic.utils').post_reload()]])
vim.cmd(':PackerCompile')
end
end