Skip to content

Commit

Permalink
docs/hacking: add section on adding plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Oct 1, 2023
1 parent 9b7dab1 commit 33779cd
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/manual/hacking.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,38 @@ in {
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.
====

=== Adding Plugins

To add a new neovim plugin, first add the source url in the inputs section of `flake.nix`

[source,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`:

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

You can now reference this plugin using its string name:

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

0 comments on commit 33779cd

Please sign in to comment.