From 1d1c6753c6fdbfb345743858131899d70431de84 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Thu, 3 Jun 2021 20:27:23 +0200 Subject: [PATCH] neovim: set packpath only if there are packages part of the work to automatically disable the generation of init.vim when unnecessary --- pkgs/misc/vim-plugins/vim-utils.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 1163f5dd9f0e..5ca3aef23588 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -184,7 +184,7 @@ let rtpPath = "share/vim-plugins"; - nativeImpl = packages: lib.optionalString (packages != null) + nativeImpl = packages: (let link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}"); packageLinks = (packageName: {start ? [], opt ? []}: @@ -340,8 +340,8 @@ let entries = [ beforePlugins vamImpl - (nativeImpl packages) ] + ++ lib.optional (packages != null && packages != []) (nativeImpl packages) ++ lib.optional (pathogen != null) pathogenImpl ++ lib.optional (plug != null) plugImpl ++ [ customRC ];