From beedffcb5be18e0f2e813252412e0f84a4e44bb4 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 19:17:05 +0100 Subject: [PATCH] mini/bufremove: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/bufremove/bufremove.nix | 13 +++++++++++++ modules/plugins/mini/bufremove/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/bufremove/default.nix | 6 ++++++ modules/plugins/mini/default.nix | 1 + 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/bufremove/bufremove.nix create mode 100644 modules/plugins/mini/bufremove/config.nix create mode 100644 modules/plugins/mini/bufremove/default.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3d55f630..5624aa07 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -60,6 +60,7 @@ - `mini.base16` - `mini.basics` - `mini.bracketed` + - `mini.bufremove` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 5fe53f6a..d5305234 100644 --- a/flake.lock +++ b/flake.lock @@ -1032,6 +1032,22 @@ "type": "github" } }, + "plugin-mini-bufremove": { + "flake": false, + "locked": { + "lastModified": 1730726192, + "narHash": "sha256-CB6ZIlrCQlh2W44Knnb10REDcvj4jcYkW/9CiOaoH2E=", + "owner": "echasnovski", + "repo": "mini.bufremove", + "rev": "285bdac9596ee7375db50c0f76ed04336dcd2685", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.bufremove", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2234,6 +2250,7 @@ "plugin-mini-base16": "plugin-mini-base16", "plugin-mini-basics": "plugin-mini-basics", "plugin-mini-bracketed": "plugin-mini-bracketed", + "plugin-mini-bufremove": "plugin-mini-bufremove", "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 2875a010..01f9bead 100644 --- a/flake.nix +++ b/flake.nix @@ -775,5 +775,10 @@ url = "github:echasnovski/mini.bracketed"; flake = false; }; + + plugin-mini-bufremove = { + url = "github:echasnovski/mini.bufremove"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/bufremove/bufremove.nix b/modules/plugins/mini/bufremove/bufremove.nix new file mode 100644 index 00000000..79b84936 --- /dev/null +++ b/modules/plugins/mini/bufremove/bufremove.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.bufremove = { + enable = mkEnableOption "mini.bufremove"; + setupOpts = mkPluginSetupOption "mini.bufremove" {}; + }; +} diff --git a/modules/plugins/mini/bufremove/config.nix b/modules/plugins/mini/bufremove/config.nix new file mode 100644 index 00000000..b65b261a --- /dev/null +++ b/modules/plugins/mini/bufremove/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.bufremove; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-bufremove"]; + + pluginRC.mini-bufremove = entryAnywhere '' + require("mini.bufremove").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/bufremove/default.nix b/modules/plugins/mini/bufremove/default.nix new file mode 100644 index 00000000..7f4e79f9 --- /dev/null +++ b/modules/plugins/mini/bufremove/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./bufremove.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index dce0e081..da5ccb83 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -6,5 +6,6 @@ # ./base16 # NOTE: configured in theme/ ./basics ./bracketed + ./bufremove ]; }