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.
main
anirudhb 3 years ago committed by Matthieu Coudron
parent 483b311b17
commit d9d1a11aed
  1. 4
      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()
'');

Loading…
Cancel
Save