Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install local paq plugins? #25

Closed
megalithic opened this issue Mar 15, 2021 · 7 comments
Closed

Install local paq plugins? #25

megalithic opened this issue Mar 15, 2021 · 7 comments

Comments

@megalithic
Copy link

Hey there @savq!

I was wondering if it was possible to point to local filesystem for in-development plugins?

Thanks!

@savq
Copy link
Owner

savq commented Mar 17, 2021

You can change the directory where Paq downloads stuff with the setup function, but that won't change neovim's runtime path.

Under.local/site/nvim/pack, I keep three directories:

  • paqs, the usual paq-directory
  • local, where I put the plugins I develop
  • test, where Paq puts plugins when running the "test" suite

I have my term-multiplexer set-up so I can open new a terminal in .local/site/nvim/pack/local/start, and get to work quickly.

The only risk with putting your plugin in paqs is that if it isn't listed in your config, Paq will delete it. Once I accidentally let Paq delete itself that way, without pushing the latest commits, true story. 🤦‍♂️

@aca
Copy link

aca commented Mar 24, 2021

+1 for something like paq '~/vim/personal'
Maybe can we just create symbolic link when local filesystem is used?

Paq is best plugin manager. Thanks @savq

@megalithic
Copy link
Author

👍 to this idea.

@savq
Copy link
Owner

savq commented Mar 25, 2021

I was a bit busy when I wrote the first answer so that was phrased wrong.

My point was that Paq doesn't modify the runtimepath, and that neovim has easier ways to track a local plugin, namely:

  • Add it to a directory in packpath (different from the one Paq uses)
  • Modify the runtimepath directly

I sorta explained the first option in the first comment (at least how I use it), but honestly, the best way to understand is to read :h packages.

The alternative, just requires you to concatenate the path to the plugin to your runtimepath:

vim.o.runtimepath = vim.o.runtimepath .. ",~/vim/personal"

Yes, it looks clunky because Lua doesn't have a concat-assignment operator (you can write it in VimL if you prefer), but it is a one liner solution that doesn't require adding anything to Paq.


Paq is best plugin manager. Thanks @savq

I wish. Thank you for using it 😄

@megalithic
Copy link
Author

Thank you so much @savq !! Learned a lot with this!

@megalithic
Copy link
Author

@savq it might be worth adding a small blurb to this explanation you gave on the readme.

@savq
Copy link
Owner

savq commented Mar 26, 2021

I've added this to the docs. Gotta keep that readme lean.

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

No branches or pull requests

3 participants