From 3533d5bcbd76bb3eb0f48ca9b44f4cca1e147e94 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 20:17:19 +0100 Subject: [PATCH] mini/extra: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/extra/config.nix | 18 ++++++++++++++++++ modules/plugins/mini/extra/default.nix | 6 ++++++ modules/plugins/mini/extra/extra.nix | 11 +++++++++++ 7 files changed, 59 insertions(+) create mode 100644 modules/plugins/mini/extra/config.nix create mode 100644 modules/plugins/mini/extra/default.nix create mode 100644 modules/plugins/mini/extra/extra.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 51a9d8db..0e87c9c5 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -67,6 +67,7 @@ - `mini.completion` - `mini.diff` - `mini.doc` + - `mini.extra` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 3ddb9ac8..7442f67e 100644 --- a/flake.lock +++ b/flake.lock @@ -1144,6 +1144,22 @@ "type": "github" } }, + "plugin-mini-extra": { + "flake": false, + "locked": { + "lastModified": 1736279066, + "narHash": "sha256-lUJrviUjAmJ70g2y93aNw3e1mHGHoB9lbh44HGP7zQs=", + "owner": "echasnovski", + "repo": "mini.extra", + "rev": "477e3dda7b597b49bc1373951ea7da4da834c352", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.extra", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2353,6 +2369,7 @@ "plugin-mini-completion": "plugin-mini-completion", "plugin-mini-diff": "plugin-mini-diff", "plugin-mini-doc": "plugin-mini-doc", + "plugin-mini-extra": "plugin-mini-extra", "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 7e8323ed..ca26f859 100644 --- a/flake.nix +++ b/flake.nix @@ -810,5 +810,10 @@ url = "github:echasnovski/mini.doc"; flake = false; }; + + plugin-mini-extra = { + url = "github:echasnovski/mini.extra"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index fb4f7000..d945a222 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -13,5 +13,6 @@ ./completion ./diff ./doc + ./extra ]; } diff --git a/modules/plugins/mini/extra/config.nix b/modules/plugins/mini/extra/config.nix new file mode 100644 index 00000000..c430847d --- /dev/null +++ b/modules/plugins/mini/extra/config.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.mini.extra; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-extra"]; + + pluginRC.mini-extra = entryAnywhere '' + require("mini.extra").setup() + ''; + }; +} diff --git a/modules/plugins/mini/extra/default.nix b/modules/plugins/mini/extra/default.nix new file mode 100644 index 00000000..73992e72 --- /dev/null +++ b/modules/plugins/mini/extra/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./extra.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/extra/extra.nix b/modules/plugins/mini/extra/extra.nix new file mode 100644 index 00000000..c57e6cdc --- /dev/null +++ b/modules/plugins/mini/extra/extra.nix @@ -0,0 +1,11 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; +in { + options.vim.mini.extra = { + enable = mkEnableOption "mini.extra"; + }; +}