From ae767781869c1484a166db7cc44d5c4a7f7a0f85 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 21:22:23 +0100 Subject: [PATCH] mini/test: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/test/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/test/default.nix | 6 ++++++ modules/plugins/mini/test/test.nix | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/test/config.nix create mode 100644 modules/plugins/mini/test/default.nix create mode 100644 modules/plugins/mini/test/test.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 313d2e41..379195b7 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -91,6 +91,7 @@ - `mini.statusline` - `mini.surround` - `mini.tabline` + - `mini.test` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index a1996572..fb274a3e 100644 --- a/flake.lock +++ b/flake.lock @@ -1528,6 +1528,22 @@ "type": "github" } }, + "plugin-mini-test": { + "flake": false, + "locked": { + "lastModified": 1729520957, + "narHash": "sha256-NtsX441k84owAAJywq4G2rMvV6d7UR2K75G8oKam+gs=", + "owner": "echasnovski", + "repo": "mini.test", + "rev": "86a64d5a4bf9d73ebf5875edaae0d878f64f5e48", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.test", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2761,6 +2777,7 @@ "plugin-mini-statusline": "plugin-mini-statusline", "plugin-mini-surround": "plugin-mini-surround", "plugin-mini-tabline": "plugin-mini-tabline", + "plugin-mini-test": "plugin-mini-test", "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 d81a87d4..b6262653 100644 --- a/flake.nix +++ b/flake.nix @@ -930,5 +930,10 @@ url = "github:echasnovski/mini.tabline"; flake = false; }; + + plugin-mini-test = { + url = "github:echasnovski/mini.test"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index e18ecbba..1025a927 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -37,5 +37,6 @@ ./statusline ./surround ./tabline + ./test ]; } diff --git a/modules/plugins/mini/test/config.nix b/modules/plugins/mini/test/config.nix new file mode 100644 index 00000000..bff42966 --- /dev/null +++ b/modules/plugins/mini/test/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.test; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-test"]; + + pluginRC.mini-test = entryAnywhere '' + require("mini.test").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/test/default.nix b/modules/plugins/mini/test/default.nix new file mode 100644 index 00000000..e78c7250 --- /dev/null +++ b/modules/plugins/mini/test/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./test.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/test/test.nix b/modules/plugins/mini/test/test.nix new file mode 100644 index 00000000..fba4db0b --- /dev/null +++ b/modules/plugins/mini/test/test.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.test = { + enable = mkEnableOption "mini.test"; + setupOpts = mkPluginSetupOption "mini.test" {}; + }; +}