Skip to content

Commit

Permalink
docs/vim.section.md: Add note about nvimRequireCheck
Browse files Browse the repository at this point in the history
We are trying to use this more often but, at the moment, it's a manual
addition to overrides.nix. Add notes about the benefits of adding it and
how it can help identify missing dependencies.
  • Loading branch information
khaneliman committed Oct 19, 2024
1 parent 562207a commit efcfde6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/languages-frameworks/vim.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,18 @@ To add a new plugin, run `nix-shell -p vimPluginsUpdater --run 'vim-plugins-upda

Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `vimPluginsUpdater` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of the Language Server Protocol integration with Vim/Neovim.

### Testing plugins {#testing-vim-plugins}

A good way to identify required dependencies, and prevent surprise breaking changes, is by running Neovim and requiring the plugin to watch for runtime errors.

This is easily achieved through `nvimRequireCheck` in the [overrides.nix](https:/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix).
```nix
gitsigns-nvim = super.gitsigns-nvim.overrideAttrs {
dependencies = with self; [ plenary-nvim ];
nvimRequireCheck = "gitsigns";
};
```

### Plugin optional configuration {#vim-plugin-required-snippet}

Some plugins require specific configuration to work. We choose not to
Expand Down

0 comments on commit efcfde6

Please sign in to comment.