From b7a34ad52b86b589f9b1631a13093a8487a0bfbf Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 6 Oct 2024 20:51:33 +0200 Subject: [PATCH] neo-tree: lazy load --- modules/plugins/filetree/neo-tree/config.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/plugins/filetree/neo-tree/config.nix b/modules/plugins/filetree/neo-tree/config.nix index be67df1..16cc029 100644 --- a/modules/plugins/filetree/neo-tree/config.nix +++ b/modules/plugins/filetree/neo-tree/config.nix @@ -4,8 +4,6 @@ ... }: let inherit (lib.modules) mkIf; - inherit (lib.nvim.dag) entryAnywhere; - inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.filetree.neo-tree; in { @@ -20,11 +18,17 @@ in { "neo-tree-nvim" ]; - visuals.nvimWebDevicons.enable = true; + lazy.plugins = [ + { + package = "neo-tree-nvim"; + setupModule = "neo-tree"; + inherit (cfg) setupOpts; - pluginRC.neo-tree = entryAnywhere '' - require("neo-tree").setup(${toLuaObject cfg.setupOpts}) - ''; + cmd = ["Neotree"]; + } + ]; + + visuals.nvimWebDevicons.enable = true; }; }; }