Giter Site home page Giter Site logo

Comments (7)

savq avatar savq commented on July 17, 2024 1

Unfortunately, this isn't a feature that I'd be willing to add to Paq.

Using neovim's built-in package system, and not modifying the runtimepath was one of the motivating factors to write Paq in the first place.

The projects you linked to are, as you said, not (neo)vim specific. I'd recommend you symlink the vim-related directories to a different pack/ directory. See :help packages.

For example, with Black:

$ pip install black

$ pip show black   # this will show the location where Black is installed

$ cd ${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/" # Go to the directory where Neovim expects package collections

$ mkdir local_plugins    # Create your own directory for local plugins

$ cd local_plugins

$ ln -s path/to/black/

Neovim will append directories in pack/*/ to the runtimepath automatically.

I know this isn't a smooth workaround, but having a neovim package manager download Python dependencies seems like a terrible idea tbh. Letting pip (or conda or whatever) do the work and version handling will cause less trouble in the long run.

from paq-nvim.

savq avatar savq commented on July 17, 2024 1

The runtimepath rule doesn't exist because it's important (it's not, modifying the runtime was the way Pathogen worked). It's simply there to mantain a somewhat consistent scope for the project.

Symlinking in unix systems is easy (that's why I suggested it), but not that simple in Windows iirc. And Windows support is something I kinda already commited to 😕. It's more a matter of trade-offs, you know? Paq has a simpler feature set, that works well with nvim 0.4 and windows. Packer does have configuration for runtime directories, and might be a better fit for your use cases.

from paq-nvim.

dashavoo avatar dashavoo commented on July 17, 2024

Interesting, I hadn't realised what vim-plug's rtp option stood for.

That is fine, but just for clarity: I think I picked a bad example with black. I agree neovim managing Python dependencies is a bad idea. I was hoping for support for non-standard repository layouts. In the first example I gave the vim/ subdirectory is what I actually wanted Paq to use, discarding everything else.

from paq-nvim.

savq avatar savq commented on July 17, 2024

Yes, I understand. But there are only two ways Paq can use the vim/ directory. Either Paq is loaded at start-up to modify the runtimepath, or Neovim knows already to load the package, which can done by symlinking the package appropriately.

The point still stands, Paq doesn't have to be loaded at start-up, and add this feature also implies adding that requirement, which is not something I'm interested in, since it only really applies to these rare cases.

from paq-nvim.

bendk avatar bendk commented on July 17, 2024

Is there a way to implement something similar without modifying the runtimepath?

Use case: I want Paq to install and manage the onehalf color scheme (https://github.com/sonph/onehalf). The vim-specific stuff is in the vim/ subdirectory.

What about adding a vim-root option? If specified then paq will:

  • Checkout the repo to a different location (maybe paqs/repos/onehalf)
  • Add a symlink at paqs/start/onehalf pointing to paqs/reops/onehalf/vim

Seems like a reasonable way to manage this without needing to modify the runtime path. The uninstall code would need to be altered to remove things from the repos directory as well, but that seems simple enough. The other corner case is checking when someone changes the vim-root value, in which case you'd need to move the directory and fiddle with the symlink. If this is something you're interested in adding, I could try writing a PR.

from paq-nvim.

MatthiasGrandl avatar MatthiasGrandl commented on July 17, 2024

This one as well: https://github.com/soywod/himalaya/tree/master/vim

@savq would you be cool with the solution @bendk proposed?

from paq-nvim.

yochem avatar yochem commented on July 17, 2024

Another possibility would be to:

  1. ask the maintainers if they could divide the repository up in seperate repositories (and maybe use git submodules)
  2. Create a repo, submodule https://github.com/sonph/onehalf, then ln -s vim/* to ./*

from paq-nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.