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

This commit is contained in:
raf 2025-03-07 16:20:46 +03:00
parent 2d5ff939b0
commit b463792348
No known key found for this signature in database
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:
```nix
config.vim.extraPlugins = with pkgs.vimPlugins; {
aerial = {
package = aerial-nvim;
setup = "require('aerial').setup {}";
};
{pkgs, ...}: {
config.vim.extraPlugins = {
aerial = {
package = pkgs.vimPlugins.aerial-nvim;
setup = "require('aerial').setup {}";
};
harpoon = {
package = harpoon;
setup = "require('harpoon').setup {}";
after = ["aerial"]; # place harpoon configuration after aerial
harpoon = {
package = pkgs.vimPlugins.harpoon;
setup = "require('harpoon').setup {}";
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:
```nix
{
config.vim.extraPlugins = with pkgs.vimPlugins; {
{pkgs, ...}: {
config.vim.extraPlugins = {
aerial = {
package = aerial-nvim;
package = pkgs.vimPlugins.aerial-nvim;
setup = ''
require('aerial').setup {
-- some lua configuration here
@ -17,7 +17,7 @@ use the extra plugin module as follows:
};
harpoon = {
package = harpoon;
package = pkgs.vimPlugins.harpoon;
setup = "require('harpoon').setup {}";
after = ["aerial"];
};