From fb36de0aac998c7cb2d45f80e01ffc0bde63097b Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:59:10 +0200 Subject: [PATCH] icon-picker: lazy load --- .../plugins/utility/icon-picker/config.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/plugins/utility/icon-picker/config.nix b/modules/plugins/utility/icon-picker/config.nix index 405f691..13fa45e 100644 --- a/modules/plugins/utility/icon-picker/config.nix +++ b/modules/plugins/utility/icon-picker/config.nix @@ -4,20 +4,22 @@ ... }: let inherit (lib.modules) mkIf; - inherit (lib.nvim.dag) entryAnywhere; cfg = config.vim.utility.icon-picker; in { config = mkIf cfg.enable { - vim.startPlugins = [ - "icon-picker-nvim" - "dressing-nvim" - ]; + vim.startPlugins = ["dressing-nvim"]; - vim.pluginRC.icon-picker = entryAnywhere '' - require("icon-picker").setup({ - disable_legacy_commands = true - }) - ''; + vim.lazy.plugins = [ + { + package = "icon-picker-nvim"; + setupModule = "icon-picker"; + setupOpts = { + disable_legacy_commands = true; + }; + + cmd = ["IconPickerInsert" "IconPickerNormal" "IconPickerYank"]; + } + ]; }; }