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')
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue