This repository was archived by the owner on Apr 16, 2024. It is now read-only.
Commit 321df84
committed
chore(init.lua): do not invoke DoomStarted while PackerSync is running
When running doom for the first time (or after ~/.local/share/nvim/site
is cleaned) doom will bootstrap itself by calling packer.sync().
However that happens asynchronously, so do not call DoomStarted in this
case: doom is not ready yet.
This will allow to safely run the following command to synchronize doom
config with packages:
```
nvim --headless --cmd "autocmd User PackerComplete quitall" --cmd "autocmd User DoomStarted PackerSync"
```
Previously such a command wouldn't have been safe on initial run due to
the implicit packer.sync: 2 packer syncs running at the same time would
show a lot of lua module errors about modules not found, it is best
avoided.
On subsequent runs it would've been safe but it is useful to have a
single command to run that is always safe.
This should also make it possible to use a similar command in a CI to
wait for the installation of packages and then test that the doom config
works.
Signed-off-by: Edwin Török <edwin@etorok.net>1 parent 46940e6 commit 321df84
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
0 commit comments