Closed eyalk11 closed 1 year ago
You can use this. https://github.com/junegunn/vim-plug/blob/master/doc/plug.txt#L291-L291
It is true. But I think this is a functionality the plugin manager should ideally have.
PS I tried
Plug 'eyalk11/nvim-voicerec', {'do': ':!python -m pip install -r ./requirements.txt \| :UpdateRemotePlugins'}
Didn't work. I couldn't understand if it runs the python or not / what is the output.
It would be easier to see what's going on under the hood if you use a function like so (maybe with some logging).
" You don't have to write the full path as the working directory is automatically set to the plugin directory
function! VoicerecDependencies()
!pip install -r requirements.txt
UpdateRemotePlugins
endfunction
Plug 'eyalk11/nvim-voicerec', { 'do': { -> VoicerecDependencies() } }
Also, instead of having users define the function, your plugin can provide it as an autoload function, so the users can just write:
Plug 'eyalk11/nvim-voicerec', { 'do': { -> voicerec#install() } }
I tried to install my plugin , and it doesn't seem to support python requirements (download the required etc).
This is the repo.
https://github.com/eyalk11/nvim-voicerec