[question] How to install plugins locally and also use the system wide plugins like what pip does for Python packages?
- Dominant language
- Vim Script
- Stars
- 35.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
I want to set up neovim for all users of my Linux server, and I use vim-plug to manage the plugins.
The part about plugin installation is something like the following:
```
let g:PLUGIN_HOME="/usr/local/share/nvim/site"
call plug#begin(g:PLUGIN_HOME)
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
Plug 'Shougo/neco-vim', { 'for': 'vim' }
call plug#end()
```
This works fine and will install plugins into `/usr/local/share/nvim/site`. All users can use these plugins under their account.
The problem is that I do not know how to let the users also use vim-plug to install other plugins they want to use.
For example, suppose a user want to install [ayu-vim](https://github.com/ayu-theme/ayu-vim), if they use `Plug 'ayu-theme/ayu-vim'` in `~/.config/nvim/init.vim` and then use `:PlugInstall`. vim-plug warns that the user does not have permission to install plugins under `/usr/local/share/nvim/site`.
If the user choose to use:
```
call plug#begin('/home/username/.local/share/nvim/plugged')
Plug 'ayu-theme/ayu-vim'
call plug#end()
```
Only this plugin will take effect, and all other plugins under `/usr/local/share/nvim/site` does not work anymore.
Of course, the user can install the plugin manually and update the `runtimepath` variable manually. But it would be preferable to use vim-plug to manage the plugins.
I am thinking of a functionality similar to how [pip](https://pypi.org/project/pip/) manages user and global packages, i.e., the user can choose to install plugins locally if he does not have root rights. In this way, the user can use both system-wide plugins and also user-specific plugins.
Is there an easy to achieve this right now?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.