docs/custom-plugins: avoid using with scopes in the manual

This commit is contained in:
raf 2025-03-07 16:20:46 +03:00
commit 3c672f64fc
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 15 additions and 13 deletions

View file

@ -32,16 +32,18 @@ that the `extraPlugins` option has its own DAG scope), and the its setup code
respectively. For example: respectively. For example:
```nix ```nix
config.vim.extraPlugins = with pkgs.vimPlugins; { {pkgs, ...}: {
aerial = { config.vim.extraPlugins = {
package = aerial-nvim; aerial = {
setup = "require('aerial').setup {}"; package = pkgs.vimPlugins.aerial-nvim;
}; setup = "require('aerial').setup {}";
};
harpoon = { harpoon = {
package = harpoon; package = pkgs.vimPlugins.harpoon;
setup = "require('harpoon').setup {}"; setup = "require('harpoon').setup {}";
after = ["aerial"]; # place harpoon configuration after aerial after = ["aerial"]; # place harpoon configuration after aerial
};
}; };
} }
``` ```

View file

@ -5,10 +5,10 @@ under `vim.extraPlugins`. Instead of using DAGs exposed by the library, you may
use the extra plugin module as follows: use the extra plugin module as follows:
```nix ```nix
{ {pkgs, ...}: {
config.vim.extraPlugins = with pkgs.vimPlugins; { config.vim.extraPlugins = {
aerial = { aerial = {
package = aerial-nvim; package = pkgs.vimPlugins.aerial-nvim;
setup = '' setup = ''
require('aerial').setup { require('aerial').setup {
-- some lua configuration here -- some lua configuration here
@ -17,7 +17,7 @@ use the extra plugin module as follows:
}; };
harpoon = { harpoon = {
package = harpoon; package = pkgs.vimPlugins.harpoon;
setup = "require('harpoon').setup {}"; setup = "require('harpoon').setup {}";
after = ["aerial"]; after = ["aerial"];
}; };