From eaae68aea27193429b414cfbaef2f46620ebaa15 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 19:14:30 +0100 Subject: [PATCH] mini/bracketed: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/bracketed/bracketed.nix | 13 +++++++++++++ modules/plugins/mini/bracketed/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/bracketed/default.nix | 6 ++++++ modules/plugins/mini/default.nix | 1 + 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/bracketed/bracketed.nix create mode 100644 modules/plugins/mini/bracketed/config.nix create mode 100644 modules/plugins/mini/bracketed/default.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 7523aa22..3d55f630 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -59,6 +59,7 @@ - `mini.animate` - `mini.base16` - `mini.basics` + - `mini.bracketed` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 2c580ea0..5fe53f6a 100644 --- a/flake.lock +++ b/flake.lock @@ -1016,6 +1016,22 @@ "type": "github" } }, + "plugin-mini-bracketed": { + "flake": false, + "locked": { + "lastModified": 1737036218, + "narHash": "sha256-y+tGFF1H37ES/hnEtr3GJK3GeB6D5s8ZdSpvzl+lh3s=", + "owner": "echasnovski", + "repo": "mini.bracketed", + "rev": "0091e11fabe34973fc038a8d0d0485202742e403", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.bracketed", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2217,6 +2233,7 @@ "plugin-mini-animate": "plugin-mini-animate", "plugin-mini-base16": "plugin-mini-base16", "plugin-mini-basics": "plugin-mini-basics", + "plugin-mini-bracketed": "plugin-mini-bracketed", "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 c14323b2..2875a010 100644 --- a/flake.nix +++ b/flake.nix @@ -770,5 +770,10 @@ url = "github:echasnovski/mini.basics"; flake = false; }; + + plugin-mini-bracketed = { + url = "github:echasnovski/mini.bracketed"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/bracketed/bracketed.nix b/modules/plugins/mini/bracketed/bracketed.nix new file mode 100644 index 00000000..950f4e7f --- /dev/null +++ b/modules/plugins/mini/bracketed/bracketed.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.bracketed = { + enable = mkEnableOption "mini.bracketed"; + setupOpts = mkPluginSetupOption "mini.bracketed" {}; + }; +} diff --git a/modules/plugins/mini/bracketed/config.nix b/modules/plugins/mini/bracketed/config.nix new file mode 100644 index 00000000..09c6262f --- /dev/null +++ b/modules/plugins/mini/bracketed/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.bracketed; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-bracketed"]; + + pluginRC.mini-bracketed = entryAnywhere '' + require("mini.bracketed").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/bracketed/default.nix b/modules/plugins/mini/bracketed/default.nix new file mode 100644 index 00000000..057dbd31 --- /dev/null +++ b/modules/plugins/mini/bracketed/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bracketed.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 8ec59e16..dce0e081 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -5,5 +5,6 @@ ./animate # ./base16 # NOTE: configured in theme/ ./basics + ./bracketed ]; }