From f31b2e06cb37df853b364eb1d95930ea383b193a Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 20:34:02 +0100 Subject: [PATCH] mini/icons: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/icons/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/icons/default.nix | 6 ++++++ modules/plugins/mini/icons/icons.nix | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/icons/config.nix create mode 100644 modules/plugins/mini/icons/default.nix create mode 100644 modules/plugins/mini/icons/icons.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 1c843924..e9c1300d 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -73,6 +73,7 @@ - `mini.git` - `mini.hipatterns` - `mini.hues` + - `mini.icons` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index edb5d0c2..13ed65d9 100644 --- a/flake.lock +++ b/flake.lock @@ -1240,6 +1240,22 @@ "type": "github" } }, + "plugin-mini-icons": { + "flake": false, + "locked": { + "lastModified": 1737036219, + "narHash": "sha256-w0PxiTj9uiUffZXkMM18IO/b/zPpdRKW9ydyhvXRoqE=", + "owner": "echasnovski", + "repo": "mini.icons", + "rev": "910db5df9724d65371182948f921fce23c2c881e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.icons", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2455,6 +2471,7 @@ "plugin-mini-git": "plugin-mini-git", "plugin-mini-hipatterns": "plugin-mini-hipatterns", "plugin-mini-hues": "plugin-mini-hues", + "plugin-mini-icons": "plugin-mini-icons", "plugin-minimap-vim": "plugin-minimap-vim", "plugin-modes-nvim": "plugin-modes-nvim", "plugin-neo-tree-nvim": "plugin-neo-tree-nvim", diff --git a/flake.nix b/flake.nix index 98057d45..cb820687 100644 --- a/flake.nix +++ b/flake.nix @@ -840,5 +840,10 @@ url = "github:echasnovski/mini.hues"; flake = false; }; + + plugin-mini-icons = { + url = "github:echasnovski/mini.icons"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 39c05cfe..23b12820 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -19,5 +19,6 @@ ./git ./hipatterns ./hues + ./icons ]; } diff --git a/modules/plugins/mini/icons/config.nix b/modules/plugins/mini/icons/config.nix new file mode 100644 index 00000000..aa446935 --- /dev/null +++ b/modules/plugins/mini/icons/config.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.mini.icons; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-icons"]; + + pluginRC.mini-icons = entryAnywhere '' + require("mini.icons").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/icons/default.nix b/modules/plugins/mini/icons/default.nix new file mode 100644 index 00000000..f0b16ce8 --- /dev/null +++ b/modules/plugins/mini/icons/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./icons.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/icons/icons.nix b/modules/plugins/mini/icons/icons.nix new file mode 100644 index 00000000..096fa9c2 --- /dev/null +++ b/modules/plugins/mini/icons/icons.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.icons = { + enable = mkEnableOption "mini.icons"; + setupOpts = mkPluginSetupOption "mini.icons" {}; + }; +}