summary refs log tree commit diff
path: root/doc/languages-frameworks
diff options
context:
space:
mode:
authorRoman Volosatovs <rvolosatovs@riseup.net>2018-09-20 09:05:33 +0200
committerRoman Volosatovs <rvolosatovs@riseup.net>2018-09-20 09:05:33 +0200
commitc1d8b1e26610819a3ab4b98190b52c7c8ff9ced6 (patch)
treea6f7d569cb7391ba25911df3cdbaa6df497b5afc /doc/languages-frameworks
parent516a83c0e825843b5984adcabf710ef240343f31 (diff)
downloadnixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.tar
nixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.tar.gz
nixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.tar.bz2
nixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.tar.lz
nixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.tar.xz
nixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.tar.zst
nixlib-c1d8b1e26610819a3ab4b98190b52c7c8ff9ced6.zip
doc: Add section about vim-plug
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r--doc/languages-frameworks/vim.section.md50
1 files changed, 49 insertions, 1 deletions
diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md
index f0a6559c3d51..9c7d21a5a02e 100644
--- a/doc/languages-frameworks/vim.section.md
+++ b/doc/languages-frameworks/vim.section.md
@@ -59,7 +59,7 @@ vim_configurable.customize {
 }
 ```
 
-For Neovim the syntax is
+For Neovim the syntax is:
 
 ```
 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.
 
+## 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
 
 ### Handling dependencies of Vim plugins