neovimUtils: only set packpath/rtp as needed

... when there are plugins
This commit is contained in:
linsui 2023-03-18 21:12:28 +08:00 committed by Matthieu Coudron
parent 5dcdfd4b1c
commit 7ee8aa8039

View file

@ -107,9 +107,10 @@ let
# vim accepts a limited number of commands so we join them all
flags = [
"--cmd" (lib.intersperse "|" hostProviderViml)
] ++ lib.optionals (myVimPackage.start != [] || myVimPackage.opt != []) [
"--cmd" "set packpath^=${vimUtils.packDir packDirArgs}"
"--cmd" "set rtp^=${vimUtils.packDir packDirArgs}"
];
];
in
[
"--inherit-argv0" "--add-flags" (lib.escapeShellArgs flags)