Trouble with vim plugins for vim_customizable

I try to change my vim plugins away from pathogen to using native vim8 packages.
Therefore I use vim_customizable as specified in the nixpkgs manual.

This is the package I have in my packageOverrides:

myVim = vim_configurable.customize {
            name = "vim-with-plugins";
                vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
          # loaded on start
          start = [
                ale
            ctrlp
                deoplete-jedi
            fugitive
                nerdtree
                nerdtree-git-plugin
                supertab
                vim-pandoc
                vim-pandoc-syntax
                vim-nix
          ];
        };
  };

But somehow, plug-ins are not loaded at launch. In /run/current-system/sw/share/vim/vim81/pack/dist/opt/ some plugins appear, but these are not the ones I specified. And there is no start folder in there.

What am I doing wrong?

1 Like

I found the solution: The name argument of vim_configurable.customize does not only specify the package name, but also the name of the executable/ command it is invoked with.
So this customized vim with my plugins was only available when invoking vim-with-plugins, otherwise I got an uncustomized one.

I think this is documented pretty badly, as this took me several hours to find out. Iā€™m going to update the documentation accordingly.

3 Likes