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.
This commit is contained in:
anirudhb 2021-09-17 18:00:23 -07:00 committed by Matthieu Coudron
parent 483b311b17
commit d9d1a11aed

View File

@ -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()
'');