[Nix-dev] How to configure neovim?

Matthias Beyer mail at beyermatthias.de
Sat Oct 17 12:56:48 CEST 2015


Well, I was able to build neovim with the configuration, but only in a
nix-repl, not in the system.

Here is what I did:

    :l <nixos>
    sysp = config.environment.systemPackages
    systemnvim = lib.findFirst (x: lib.hasPrefix "neovim" x.name) null sysp
    :b systemnvim.override { vimAlias = false;
         configure = import ~/config/nixos/pkgs/vim/customization.nix { pkgs = pkgs; }; }

which results in

    this derivation produced the following outputs:
      out -> /nix/store/db56l9gsri8mkj5ja1i0kc30niirmfgw-neovim-2015-06-09-configured

I then went to the store and executed the `nvim` binary, which gave me
the neovim including my plugins and customizations.


What I have in my system configuration:

    # neovim.nix:

    let
      nvim = pkgs.neovim.override {
        vimAlias = false;
        configure = import ./vim/customization.nix { pkgs = pkgs; };
      };
    in [ nvim pkgs.python pkgs.ctags ]

Which I include in my `systemPackages`.

    systemPackages = foo ++ nvimpkgs ++ bar;

The `customization.nix` file in the above code snippets is the same,
it is also the very same file I use to build my vim with
`vim_configurable`, so no differences there.

Can someone tell me what I'm doing wrong here? As said, the
nix-repl-example resulted in desired results, the system rebuild
results in a plain `nvim` binary which has no plugins, no custom
RC-file, nothing.

Help would be appreciated.

Anyways, have a nice weekend!

On 15-10-2015 16:38:42, Matthias Beyer wrote:
> I tried the approach you linked, though neovim doesn't get any plugins
> or RC linked in...
> 
> On 15-10-2015 11:34:19, Rok Garbas wrote:
> > 
> > the neovim expression already supports this via more general '.override'
> > function. my example is here: 
> >     https://github.com/garbas/dotfiles/blob/master/pkgs/default.nix#L83
> > 
> 
> -- 
> Mit freundlichen Grüßen,
> Kind regards,
> Matthias Beyer
> 
> Proudly sent with mutt.
> Happily signed with gnupg.



> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20151017/41a05a94/attachment.bin 


More information about the nix-dev mailing list