mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
docs: add FAQ entry for plugin modules outside NixVim
This commit is contained in:
parent
15b1a1ffca
commit
e006fa229c
1 changed files with 24 additions and 0 deletions
|
|
@ -7,6 +7,30 @@ Using a plugin not supported by nixvim, but packaged in nixpkgs is straightforwa
|
|||
- Register the plugin through `extraPlugins`: `extraPlugins = [pkgs.vimPlugins."<plugin name>"]`.
|
||||
- Configure the plugin through `extraConfigLua`: `extraConfigLua = "require('my-plugin').setup({foo = "bar"})";`
|
||||
|
||||
## How do I use a plugin not yet merged into NixVim or temporarily modify one
|
||||
|
||||
Copy the module expression formatted like this into a file:
|
||||
|
||||
```nix
|
||||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
# ...
|
||||
}
|
||||
```
|
||||
|
||||
Import it into your NixVim configuration and configure it:
|
||||
```nix
|
||||
{
|
||||
# Remove this `programs.nixvim` wrapper for standalone configurations
|
||||
programs.nixvim = {
|
||||
# You could also substitute the filename with the module expression
|
||||
imports = [ ./my-plugin.nix ];
|
||||
|
||||
plugins.my-plugin.enable = true;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## How do I use a plugin not packaged in nixpkgs
|
||||
|
||||
This is straightforward too, you can add the following to `extraPlugins` for a plugin hosted on GitHub:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue