Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add steps to add new plugin in CONTRIBUTING.md #138

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"];
----
Loading