feat(utils): CosmicReload will recompile
This commit is contained in:
parent
7c0be72d08
commit
bc79ee19e3
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue