diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 067782d8..28b9408a 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -55,6 +55,7 @@ - Add `"prettierd"` as a formatter option in `vim.languages.markdown.format.type`. - Add the following plugins from [mini.nvim](https://github.com/echasnovski/mini.nvim) - `mini.ai` + - `mini.align` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 351eae83..5bcb6a8c 100644 --- a/flake.lock +++ b/flake.lock @@ -952,6 +952,22 @@ "type": "github" } }, + "plugin-mini-align": { + "flake": false, + "locked": { + "lastModified": 1735582248, + "narHash": "sha256-oHub8dEihIx4kcP3CD9GXG1SUObJUVpH4bg2Z6PmadQ=", + "owner": "echasnovski", + "repo": "mini.align", + "rev": "e715137aece7d05734403d793b8b6b64486bc812", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.align", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2149,6 +2165,7 @@ "plugin-lzn-auto-require": "plugin-lzn-auto-require", "plugin-mind-nvim": "plugin-mind-nvim", "plugin-mini-ai": "plugin-mini-ai", + "plugin-mini-align": "plugin-mini-align", "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 c236e71a..1586e384 100644 --- a/flake.nix +++ b/flake.nix @@ -750,5 +750,10 @@ url = "github:echasnovski/mini.ai"; flake = false; }; + + plugin-mini-align = { + url = "github:echasnovski/mini.align"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/align/align.nix b/modules/plugins/mini/align/align.nix new file mode 100644 index 00000000..c21e9532 --- /dev/null +++ b/modules/plugins/mini/align/align.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.align = { + enable = mkEnableOption "mini.align"; + setupOpts = mkPluginSetupOption "mini.align" {}; + }; +} diff --git a/modules/plugins/mini/align/config.nix b/modules/plugins/mini/align/config.nix new file mode 100644 index 00000000..0a7a5a69 --- /dev/null +++ b/modules/plugins/mini/align/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.align; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-align"]; + + pluginRC.mini-align = entryAnywhere '' + require("mini.align").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/align/default.nix b/modules/plugins/mini/align/default.nix new file mode 100644 index 00000000..9ddaff69 --- /dev/null +++ b/modules/plugins/mini/align/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./align.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index f3632321..051274cb 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -1,5 +1,6 @@ { imports = [ ./ai + ./align ]; }