Skip to content

Commit

Permalink
doc: add contribution docs on adding plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename authored Sep 23, 2023
1 parent 0a1a12e commit c578c58
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,36 @@ in {
}
```

#### Adding Plugins

To add a new (neo)vim plugin, add the source url in the inputs section of `flake.nix`

```nix
{
inputs = {
# ...
neodev-nvim = {
url = "github:folke/neodev.nvim";
flake = false;
};
};
}
```

Then add the name of the plugin into the `availablePlugins` variable in `lib/types/plugins.nix`:

```nix
# ...
availablePlugins = [
# ...
"neodev-nvim"
];
```

You can now reference this plugin using its string name:

```nix
config.vim.startPlugins = ["neodev-nvim"];
```

If you have come across a plugin that has an API that doesn't seem to easily allow custom keybindings, don't be scared to implement a draft PR. We'll help you get it done.

0 comments on commit c578c58

Please sign in to comment.