Open daveyarwood opened 2 years ago
It looks like vim-plug doesn't use vim's native packages, so installing parinfer-rust that way will not work. However, you can most likely install this plugin with vim-plug and then manually add parinfer-rust as an opt
package (see :help packages
).
% parinfer="$HOME/.local/share/nvim/site/pack/parinfer-lib/opt/parinfer-rust"
% git clone https://github.com/eraserhd/parinfer-rust.git $parinfer
% cd $parinfer
% cargo build --release
call plug#begin()
" ...
Plug 'harrygallagher4/nvim-parinfer-rust'
" ...
call plug#end()
autocmd VimEnter * lua require('parinfer').setup()
This is probably the easiest way to do this. I'll look at how vim-plug works a little bit more but I doubt it can handle installing parinfer-rust without loading its builtin vim plugin which will definitely cause issues.
I've also wanted to set up some sort of GitHub action to build the library and an optional "installer" module to handle downloading/building the library so that this weird plugin hackery isn't required. I'll update this thread if I find a better solution.
Glad some more folks are interested :)
Hi, I just pushed an update that should allow you to use vim-plug
to install this. There's a section in the readme about using vim-plug now.
Nice! I gave it a try and it did not work as-is. Parinfer stopped working altogether. I noticed that before, I had this in my vimrc:
Plug 'eraserhd/parinfer-rust', {'do': 'cargo build --release'}
Whereas your instructions say to do this:
Plug 'eraserhd/parinfer-rust', {'rtp': 'target/release', 'do': 'cargo build --release'}
I tried removing the 'rtp': 'target/release'
part and parinfer started working again.
Is there a way to confirm that your plugin is active when I'm editing a Clojure buffer, as opposed to just using eraserhd/parinfer-rust?
The rtp
key is definitely necessary. Without it, the normal parinfer-rust plugin will be loaded and the compiled library won't be found. I just set up a minimal nvim configuration with the configuration from the readme and was able to get everything working. It did require running :PlugUpdate
and then restarting nvim though.
Maybe a fresh install of both plugins would help?
I tried re-adding the rtp
part and then doing a clean install of both plugins (I ran rm -rf ~/.vim/bundle/{,nvim-}parinfer-rust
to remove both plugins, then ran :PlugInstall
to re-install them), but got the same result as before. Parinfer silently stops working altogether with the rtp
part. When I remove the rtp
part, it works, but then it isn't using nvim-parinfer-rust, as you said.
Are there maybe some logs that I can look at to try and figure out why nvim-parinfer-rust isn't working when I add the rtp
part?
Will you push your non-working config to another branch of https://github.com/daveyarwood/dotfiles? I'll try to diagnose it from there.
Sure! I've pushed a branch here: https://github.com/daveyarwood/dotfiles/tree/nvim-parinfer-rust
Hi! This plugin looks great, but it isn't clear from the README if it is possible to install via vim-plug. What are your thoughts?