Skip to content

feat: Adds a PaqWait command#182

Open
chakrit wants to merge 1 commit intosavq:masterfrom
chakrit:master
Open

feat: Adds a PaqWait command#182
chakrit wants to merge 1 commit intosavq:masterfrom
chakrit:master

Conversation

@chakrit
Copy link

@chakrit chakrit commented Dec 29, 2025

This minimally enables scripting usecases. Currently vim.system calls used in various Paq* commands are async and we have to setup autocommand hooks to wait which is not ideal.

For example, I have an auto update script like this:

nvim --headless +PaqInstall +PaqWait +qall!

This doesn't work without +PaqWait and I have to write a wrapper in lua.


Some approaches I have considered:

  • Write the wrapper in my own inits -> Looks like a clunky patch.
  • Refactoring the commands to accept async = true style parameters -> Seems non-trivial and might break api.
  • Adds alternate :PaqInstallSync command -> This would adds quite a bit of duplication and I think it doesn't follow your philosophy of keep paq minimal.

This minimally enables scripting usecases. Currently `vim.system` calls
used in various Paq* commands are async and we have to setup autocommand
hooks to wait which is not ideal.

For example, I have an auto update script like this:

    nvim --headless +PaqInstall +PaqWait +qall!

This doesn't work without `+PaqWait` and I have to write a wrapper in
lua.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant