diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 10371c90f..ac638382c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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.