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

Neovim plugin when installed with Nix is missing documentation #83

Open
cideM opened this issue Jul 19, 2020 · 0 comments
Open

Neovim plugin when installed with Nix is missing documentation #83

cideM opened this issue Jul 19, 2020 · 0 comments

Comments

@cideM
Copy link

cideM commented Jul 19, 2020

If I install the plugin through Home Manager like so

{
    programs.neovim.configure = {
      customRC = builtins.readFile ./init.vim;

      packages.n = {
        start = [ pkgs.parinfer-rust ];

        opt = [ ];
      };
    };
}

Then the plugin itself works but it doesn't have documentation nor helptags.

If I install it like this

          (pkgs.vimUtils.buildVimPluginFrom2Nix rec {
            pname = "parinfer";
            version = "latest";
            postInstall = ''
              rtpPath=$out/share/vim-plugins/${pname}-${version}
              mkdir -p $rtpPath/plugin
              sed "s,let s:libdir = .*,let s:libdir = '${pkgs.parinfer-rust}/lib'," \
                plugin/parinfer.vim >$rtpPath/plugin/parinfer.vim
            '';
            src = sources.parinfer;
          })

then everything works, but I need to replicate the postInstall hook so it properly adjusts the path based on my pname and version.

Here is how Nixpkgs installs vim plugins. I think it would make sense if this repository (parinfer) and its Nix package wouldn't change anything related to Vim. Because right now simply having parinfer-rust installed through Nixpkgs will affect the Vim runtime path.

Instead there should be a vim plugin in Nixpkgs which properly adjusts the path and has a dependency on parinfer-rust. Then people could just use the first way of installing the Vim plugin (top of this issue), and they'd get parinfer-rust as well, if it's specified as buildInputs (I assume that's the correct dep attribute, not entirely sure).

I'd imagine that if I create a Vim plugin in Nixpkgs now then it would probably conflict with parinfer-rust since both would try to change the same path in vim-plugins

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

1 participant