diff --git a/docs-preview-623/index.xhtml b/docs-preview-623/index.xhtml index 5e20adcd..f85b5e9e 100644 --- a/docs-preview-623/index.xhtml +++ b/docs-preview-623/index.xhtml @@ -970,7 +970,7 @@ allow custom keybindings, don’t be scared to implement a draft PR. We’ll hel you get it done.

-

Adding Plugins

Modular setup options
Details of toLuaObject
Lazy plugins

To add a new Neovim plugin, use npins

Use:

nix-shell -p npins or nix shell nixpkgs#npins

Then run:

npins --name <plugin name> github <owner> <repo> -b <branch>

Be sure to replace any non-alphanumeric characters with - for --name

For example

npins --name lazydev-nvim github folke laztdev.nvim -b main

You can now reference this plugin as a string.

config.vim.startPlugins = ["lazydev-nvim"];
+

Adding Plugins

To add a new Neovim plugin, use npins

Use:

nix-shell -p npins or nix shell nixpkgs#npins

Then run:

npins add --name <plugin name> github <owner> <repo> -b <branch>

Be sure to replace any non-alphanumeric characters with - for --name

For example

npins add --name lazydev-nvim github folke lazydev.nvim -b main

You can now reference this plugin as a string.

config.vim.startPlugins = ["lazydev-nvim"];
 

Modular setup options

Most plugins is initialized with a call to require('plugin').setup({...}).

We use a special function that lets you easily add support for such setup options in a modular way: mkPluginSetupOption.

Once you have added the source of the plugin as shown above, you can define the setup options like this:

# in modules/.../your-plugin/your-plugin.nix