Comments (7)
This works now. Paq can install fzf like so:
paq{'junegunn/fzf', hook=vim.fn['fzf#install'] }
Closing notes:
-
Running
:packloadall!
will source newly installed packages correctly. It's not ideal, but it works. -
Future work (including issue #2) may lead to a more organized two stage installation, a first batch of callbacks for installs, and a second for hooks and helptags; requiring only one
:packloadall!
in the middle.
from paq-nvim.
Hi. part of this feature is already in the dev branch, running shell commands to be specific. The second part, running user defined functions, is still pending what I'm doing this afternoon.
After that, I'd still need to run some tests, but I should be merging this weekend.
...way to defer a command until after a previous function is completed?
The tricky part is that we don't know when the install function ends. The hooks would run as callbacks to the install/update callbacks.
In the meantime, I can tell you that when paq prints out that it is installing something, it has in fact already done it. That's because I'm lazy Paq uses the same function to notify on success and failure.
from paq-nvim.
Quick update:
So far the hooks work, except for one small issue: the plugin isn't added to the runtime the first time it's installed, so the hook will fail the first time it runs, but it'll suceed if one re-enters nvim and runs :PaqUpdate
.
This is super annoying of course, so for now I'm leaving this feature in it's own branch updatehooks
.
Note: So far, I've only tried running packadd!
and appending to vim.o.runtimepath
, the latter wouldn't be ideal anyways because it requires checking whether it's installing or updating something.
from paq-nvim.
HUGE thank you @savq !!
from paq-nvim.
Is there a current best practice to doing this sort of thing; say after PaqInstall'ing fzf/fzf.vim to run the fzf installer scripts? maybe there's a lua way to defer a command until after a previous function is completed? i know this is something you're figuring out, just wondering if there is something to do in the interim.
from paq-nvim.
Huge thanks @savq !!
from paq-nvim.
Based on the README documentation, it isn't clear to me how to e.g. run a shell command after installing a plugin (from that plugin's directory). Is this possible using this feature? If so, could a short example for how to do it be added to the README?
from paq-nvim.
Related Issues (20)
- Unable to install local plugins using Paq HOT 1
- Add a lockfile mechanism
- nvim 0.8: several packages fail to install HOT 2
- Add enable/disable feature for plugins HOT 4
- Crash when updating: "cannot resume dead coroutine" HOT 1
- Can I have the paq configuration outside of init.lua? HOT 2
- Add commit to options HOT 4
- `Vim(split):E518: Unknown option: add` HOT 10
- Paq fails to update folke/tokyonight.nvim always HOT 3
- failed to run `cd` as post install hook HOT 2
- Wiki has out-of-date TODO for lazy loading with autocommand
- log file (PaqLogOpen) interleaves logs from different jobs HOT 1
- Question about paq vs paqs folders HOT 1
- self-installing example HOT 2
- PaqClean command removes all packages except paq-nvim HOT 2
- Add possibility to pass `opt true` on paq setup HOT 1
- Feature Request: SSH HOT 2
- `opt = true` not respected HOT 2
- [Feature] custom commands for updating/installing HOT 3
- bug in bootstrapping docs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paq-nvim.