diff options
Diffstat (limited to 'doc/languages-frameworks/vim.section.md')
-rw-r--r-- | doc/languages-frameworks/vim.section.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index bf0d663179b..1f3727f552c 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -134,7 +134,7 @@ If one of your favourite plugins isn't packaged, you can package it yourself: { config, pkgs, ... }: let - easygrep = pkgs.vimUtils.buildVimPluginFrom2Nix { + easygrep = pkgs.vimUtils.buildVimPlugin { name = "vim-easygrep"; src = pkgs.fetchFromGitHub { owner = "dkprice"; @@ -212,9 +212,9 @@ Note: this is not possible anymore for Neovim. ## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs} -Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). +Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`nix-shell -p vimPluginsUpdater --run vim-plugins-updater`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/updater.nix). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). -After running `./update.py`, if nvim-treesitter received an update, also run [`nvim-treesitter/update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py) to update the tree sitter grammars for `nvim-treesitter`. +After running the updater, if nvim-treesitter received an update, also run [`nvim-treesitter/update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py) to update the tree sitter grammars for `nvim-treesitter`. Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added: @@ -241,7 +241,8 @@ GITHUB_API_TOKEN=my_token ./pkgs/applications/editors/vim/plugins/update.py Alternatively, set the number of processes to a lower count to avoid rate-limiting. ```sh -./pkgs/applications/editors/vim/plugins/update.py --proc 1 + +nix-shell -p vimPluginsUpdater --run 'vim-plugins-updater --proc 1' ``` ## How to maintain an out-of-tree overlay of vim plugins ? {#vim-out-of-tree-overlays} @@ -250,7 +251,7 @@ You can use the updater script to generate basic packages out of a custom vim plugin list: ``` -pkgs/applications/editors/vim/plugins/update.py -i vim-plugin-names -o generated.nix --no-commit +nix-shell -p vimPluginsUpdater --run vim-plugins-updater -i vim-plugin-names -o generated.nix --no-commit ``` with the contents of `vim-plugin-names` being for example: @@ -264,7 +265,7 @@ You can then reference the generated vim plugins via: ```nix myVimPlugins = pkgs.vimPlugins.extend ( - (pkgs.callPackage generated.nix {}) + (pkgs.callPackage ./generated.nix {}) ); ``` |