2024-11-04 15:50:50 +00:00
|
|
|
# Legacy Method {#sec-legacy-method}
|
2024-04-20 03:57:11 +00:00
|
|
|
|
2024-11-07 07:57:59 +00:00
|
|
|
Prior to version v0.5, the method of adding new plugins was adding the plugin
|
2024-04-27 12:44:37 +00:00
|
|
|
package to `vim.startPlugins` and add its configuration as a DAG under one of
|
|
|
|
`vim.configRC` or `vim.luaConfigRC`. Users who have not yet updated to 0.5, or
|
|
|
|
prefer a more hands-on approach may use the old method where the load order of
|
|
|
|
the plugins is determined by DAGs.
|
2024-04-20 03:57:11 +00:00
|
|
|
|
|
|
|
## Adding plugins {#sec-adding-plugins}
|
|
|
|
|
2024-11-07 07:57:59 +00:00
|
|
|
To add a plugin not available in nvf as a module to your configuration, you may
|
|
|
|
add it to [](#opt-vim.startPlugins) in order to make it available to Neovim at
|
|
|
|
runtime.
|
2024-04-20 03:57:11 +00:00
|
|
|
|
|
|
|
```nix
|
|
|
|
{pkgs, ...}: {
|
2024-11-07 07:57:59 +00:00
|
|
|
# Add a Neovim plugin from Nixpkgs to the runtime.
|
|
|
|
vim.startPlugins = [pkgs.vimPlugins.aerial-nvim];
|
2024-04-20 03:57:11 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-04-27 12:44:37 +00:00
|
|
|
And to configure the added plugin, you can use the `luaConfigRC` option to
|
|
|
|
provide configuration as a DAG using the **nvf** extended library.
|
2024-04-20 03:57:11 +00:00
|
|
|
|
|
|
|
```nix
|
|
|
|
{inputs, ...}: let
|
2024-11-07 07:57:59 +00:00
|
|
|
# This assumes you have an input called 'nvf' in your flake inputs
|
|
|
|
# and 'inputs' in your specialArgs. In the case you have passed 'nvf'
|
|
|
|
# to specialArgs, the 'inputs' prefix may be omitted.
|
2024-04-27 12:44:37 +00:00
|
|
|
inherit (inputs.nvf.lib.nvim.dag) entryAnywhere;
|
2024-04-20 03:57:11 +00:00
|
|
|
in {
|
|
|
|
vim.luaConfigRC.aerial-nvim= entryAnywhere ''
|
|
|
|
require('aerial').setup {
|
|
|
|
-- your configuration here
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
```
|