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') vim.cmd(':PackerSync')
end end
function M.reload_user_config(notify) function M.reload_user_config(compile)
notify = notify or false compile = compile or false
unload('cosmic.config', true) unload('cosmic.config', true)
if notify then if compile then
M.post_reload() vim.cmd([[autocmd User PackerCompileDone ++once lua require('cosmic.utils').post_reload()]])
vim.cmd(':PackerCompile')
end end
end end