From 3c672f64fc2e7a19aa33000733b5fc84e29f41b8 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 7 Mar 2025 16:20:46 +0300 Subject: [PATCH] docs/custom-plugins: avoid using `with` scopes in the manual --- .../configuring/custom-plugins/configuring.md | 20 ++++++++++--------- .../custom-plugins/non-lazy-method.md | 8 ++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/manual/configuring/custom-plugins/configuring.md b/docs/manual/configuring/custom-plugins/configuring.md index 5106d29b..42af11be 100644 --- a/docs/manual/configuring/custom-plugins/configuring.md +++ b/docs/manual/configuring/custom-plugins/configuring.md @@ -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 + }; }; } ``` diff --git a/docs/manual/configuring/custom-plugins/non-lazy-method.md b/docs/manual/configuring/custom-plugins/non-lazy-method.md index 351af2eb..d8477283 100644 --- a/docs/manual/configuring/custom-plugins/non-lazy-method.md +++ b/docs/manual/configuring/custom-plugins/non-lazy-method.md @@ -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"]; };