1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

programs.neovim: dont wrap init.vim (#2058)

since we want to write it ourself in ~/.config/nvim/init.vim
This commit is contained in:
Matthieu Coudron 2021-06-03 21:37:53 +02:00 committed by GitHub
parent 95da56b783
commit c7e79b5337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 7 deletions

View file

@ -51,8 +51,7 @@ let
(map (x: if x ? plugin && x.optional == true then x.plugin else null)
cfg.plugins);
};
customRC = pkgs.lib.concatMapStrings pluginConfig cfg.plugins
+ cfg.extraConfig;
beforePlugins = "";
};
extraMakeWrapperArgs = lib.optionalString (cfg.extraPackages != [ ])
@ -242,11 +241,14 @@ in {
home.packages = [ cfg.finalPackage ];
xdg.configFile."nvim/init.vim".text = neovimConfig.neovimRcContent;
xdg.configFile = mkIf (neovimConfig.neovimRcContent != "") {
"nvim/init.vim".text = neovimConfig.neovimRcContent;
};
programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package
(neovimConfig // {
wrapperArgs = (lib.escapeShellArgs neovimConfig.wrapperArgs) + " "
+ extraMakeWrapperArgs;
wrapRc = false;
});
programs.bash.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };