From d9d1a11aed1761bc3a9d95dd2b8d154c44d4feec Mon Sep 17 00:00:00 2001 From: anirudhb Date: Fri, 17 Sep 2021 18:00:23 -0700 Subject: [PATCH] fix: remove trailing '/.' from vim-plug plugin paths For some reason vim-plug doesn't seem to like that. This fixes it so that it can properly load the plugins. --- pkgs/misc/vim-plugins/vim-utils.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 3e609b5751198..3bf5dcd9a8169 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -292,12 +292,14 @@ let /* vim-plug is an extremely popular vim plugin manager. */ + /* Remove repeated "/." suffixes from a path */ + stripDots = path: lib.head (builtins.split "(/\\.)*$" path); plugImpl = ('' source ${vimPlugins.vim-plug.rtp}/plug.vim silent! call plug#begin('/dev/null') - '' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg.rtp}'") plug.plugins) + '' + '' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${stripDots pkg.rtp}'") plug.plugins) + '' call plug#end() '');