From 5d38ae801aebda98d1729ff0f16f943a816e99f6 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Wed, 27 Jul 2022 01:10:57 +0200 Subject: [PATCH] neovimUtils: merge host settings so that they use a single --cmd flag vim is limited to 10 --cmd flags so using fewer is better --- pkgs/applications/editors/neovim/utils.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index 16b19f63d2d3..b72e758d26e1 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -102,12 +102,8 @@ let let binPath = lib.makeBinPath (lib.optionals withRuby [ rubyEnv ] ++ lib.optionals withNodeJs [ nodejs ]); - flags = lib.concatLists (lib.mapAttrsToList ( - prog: withProg: [ - "--cmd" (genProviderSettings prog withProg) - ] - ) - hostprog_check_table); + # vim accepts a limited number of commands so we join them all + flags = [ "--cmd" (lib.intersperse "|" (lib.mapAttrsToList genProviderSettings hostprog_check_table)) ]; in [ "--inherit-argv0" "--add-flags" (lib.escapeShellArgs flags)