about summary refs log tree commit diff
path: root/pkgs/applications/editors/neovim/utils.nix
diff options
context:
space:
mode:
authorlinsui <linsui555@gmail.com>2023-03-18 21:12:28 +0800
committerMatthieu Coudron <teto@users.noreply.github.com>2023-03-19 18:38:33 +0100
commit7ee8aa8039163c53f30be582040098f4165d27c1 (patch)
tree27350ddbc656a1f8e33daeb0d5b39c4982d0abda /pkgs/applications/editors/neovim/utils.nix
parent5dcdfd4b1cdeb8000c632e292db66808556a0567 (diff)
neovimUtils: only set packpath/rtp as needed
... when there are plugins
Diffstat (limited to 'pkgs/applications/editors/neovim/utils.nix')
-rw-r--r--pkgs/applications/editors/neovim/utils.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix
index 125fae66f7f7e..0f03866cc75fb 100644
--- a/pkgs/applications/editors/neovim/utils.nix
+++ b/pkgs/applications/editors/neovim/utils.nix
@@ -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)