Skip to content

Commit

Permalink
fix: remove trailing '/.' from vim-plug plugin paths
Browse files Browse the repository at this point in the history
For some reason vim-plug doesn't seem to like that. This fixes it so
that it can properly load the plugins.
  • Loading branch information
anirudhb authored and teto committed Sep 18, 2021
1 parent 483b311 commit d9d1a11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/misc/vim-plugins/vim-utils.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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()
'');
Expand Down

0 comments on commit d9d1a11

Please sign in to comment.