From 86fc7a3764b9bb3d328284bdbec4dd25cee7175d Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 19:23:03 +0100 Subject: [PATCH] mini/colors: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/colors/colors.nix | 11 +++++++++++ modules/plugins/mini/colors/config.nix | 18 ++++++++++++++++++ modules/plugins/mini/colors/default.nix | 6 ++++++ modules/plugins/mini/default.nix | 1 + 7 files changed, 59 insertions(+) create mode 100644 modules/plugins/mini/colors/colors.nix create mode 100644 modules/plugins/mini/colors/config.nix create mode 100644 modules/plugins/mini/colors/default.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 559c4c4b..16bae05c 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -62,6 +62,7 @@ - `mini.bracketed` - `mini.bufremove` - `mini.clue` + - `mini.colors` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 238f06b8..5ff55331 100644 --- a/flake.lock +++ b/flake.lock @@ -1064,6 +1064,22 @@ "type": "github" } }, + "plugin-mini-colors": { + "flake": false, + "locked": { + "lastModified": 1730726192, + "narHash": "sha256-B2JahCUhKpYwOJrl+BhSp3UQFiyyMGJAYKGK+uMv3fk=", + "owner": "echasnovski", + "repo": "mini.colors", + "rev": "d64b1c0f520579d905f97208eca85329e664ab88", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.colors", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2268,6 +2284,7 @@ "plugin-mini-bracketed": "plugin-mini-bracketed", "plugin-mini-bufremove": "plugin-mini-bufremove", "plugin-mini-clue": "plugin-mini-clue", + "plugin-mini-colors": "plugin-mini-colors", "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 b88b9d8a..11d9a5a3 100644 --- a/flake.nix +++ b/flake.nix @@ -785,5 +785,10 @@ url = "github:echasnovski/mini.clue"; flake = false; }; + + plugin-mini-colors = { + url = "github:echasnovski/mini.colors"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/colors/colors.nix b/modules/plugins/mini/colors/colors.nix new file mode 100644 index 00000000..81fe5840 --- /dev/null +++ b/modules/plugins/mini/colors/colors.nix @@ -0,0 +1,11 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; +in { + options.vim.mini.colors = { + enable = mkEnableOption "mini.colors"; + }; +} diff --git a/modules/plugins/mini/colors/config.nix b/modules/plugins/mini/colors/config.nix new file mode 100644 index 00000000..60953c16 --- /dev/null +++ b/modules/plugins/mini/colors/config.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.mini.colors; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-colors"]; + + pluginRC.mini-colors = entryAnywhere '' + require("mini.colors").setup() + ''; + }; +} diff --git a/modules/plugins/mini/colors/default.nix b/modules/plugins/mini/colors/default.nix new file mode 100644 index 00000000..4eed4770 --- /dev/null +++ b/modules/plugins/mini/colors/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./colors.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 8c3a9a4a..748cd2f8 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -8,5 +8,6 @@ ./bracketed ./bufremove ./clue + ./colors ]; }