doc: Add section about vim-plug
This commit is contained in:
parent
516a83c0e8
commit
c1d8b1e266
@ -59,7 +59,7 @@ vim_configurable.customize {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
For Neovim the syntax is
|
For Neovim the syntax is:
|
||||||
|
|
||||||
```
|
```
|
||||||
neovim.override {
|
neovim.override {
|
||||||
@ -96,6 +96,54 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n
|
|||||||
|
|
||||||
After that you can install your special grafted `myVim` or `myNeovim` packages.
|
After that you can install your special grafted `myVim` or `myNeovim` packages.
|
||||||
|
|
||||||
|
## Managing plugins with vim-plug
|
||||||
|
|
||||||
|
To use vim-plug to manage your Vim plugins the following example can be used:
|
||||||
|
|
||||||
|
```
|
||||||
|
vim_configurable.customize {
|
||||||
|
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
|
# loaded on launch
|
||||||
|
plug.plugins = [ youcompleteme fugitive phpCompletion elm-vim ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For Neovim the syntax is:
|
||||||
|
|
||||||
|
```
|
||||||
|
neovim.override {
|
||||||
|
configure = {
|
||||||
|
customRC = ''
|
||||||
|
# here your custom configuration goes!
|
||||||
|
'';
|
||||||
|
plug.plugins = with pkgs.vimPlugins; [
|
||||||
|
vim-go
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.nix` to make it installable:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
packageOverrides = pkgs: with pkgs; {
|
||||||
|
myVim = vim_configurable.customize {
|
||||||
|
name = "vim-with-plugins";
|
||||||
|
# add here code from the example section
|
||||||
|
};
|
||||||
|
myNeovim = neovim.override {
|
||||||
|
configure = {
|
||||||
|
# add here code from the example section
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
After that you can install your special grafted `myVim` or `myNeovim` packages.
|
||||||
|
|
||||||
## Managing plugins with VAM
|
## Managing plugins with VAM
|
||||||
|
|
||||||
### Handling dependencies of Vim plugins
|
### Handling dependencies of Vim plugins
|
||||||
|
Loading…
x
Reference in New Issue
Block a user