Change the default plugin directory for Neovim

And suggest users to call plug#begin() without an argument to avoid
confusion.
This commit is contained in:
Junegunn Choi
2022-01-03 23:05:08 +09:00
parent f085751ca1
commit e300178a0e
3 changed files with 51 additions and 43 deletions

View File

@@ -242,6 +242,8 @@ function! plug#begin(...)
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
elseif exists('g:plug_home')
let home = s:path(g:plug_home)
elseif has('nvim')
let home = stdpath('data') . '/plugged'
elseif !empty(&rtp)
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
else