diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 16bae05c..a9c796f1 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -63,6 +63,7 @@ - `mini.bufremove` - `mini.clue` - `mini.colors` + - `mini.comment` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 5ff55331..9a0a76b1 100644 --- a/flake.lock +++ b/flake.lock @@ -1080,6 +1080,22 @@ "type": "github" } }, + "plugin-mini-comment": { + "flake": false, + "locked": { + "lastModified": 1736611383, + "narHash": "sha256-vAgBDSVtXCP+rlu+cmXdoZQBGShyH7KfL8E/gvDMfnM=", + "owner": "echasnovski", + "repo": "mini.comment", + "rev": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.comment", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2285,6 +2301,7 @@ "plugin-mini-bufremove": "plugin-mini-bufremove", "plugin-mini-clue": "plugin-mini-clue", "plugin-mini-colors": "plugin-mini-colors", + "plugin-mini-comment": "plugin-mini-comment", "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 11d9a5a3..ef61bd9c 100644 --- a/flake.nix +++ b/flake.nix @@ -790,5 +790,10 @@ url = "github:echasnovski/mini.colors"; flake = false; }; + + plugin-mini-comment = { + url = "github:echasnovski/mini.comment"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/comment/comment.nix b/modules/plugins/mini/comment/comment.nix new file mode 100644 index 00000000..2231a360 --- /dev/null +++ b/modules/plugins/mini/comment/comment.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.comment = { + enable = mkEnableOption "mini.comment"; + setupOpts = mkPluginSetupOption "mini.comment" {}; + }; +} diff --git a/modules/plugins/mini/comment/config.nix b/modules/plugins/mini/comment/config.nix new file mode 100644 index 00000000..7babd8a9 --- /dev/null +++ b/modules/plugins/mini/comment/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.comment; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-comment"]; + + pluginRC.mini-comment = entryAnywhere '' + require("mini.comment").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/comment/default.nix b/modules/plugins/mini/comment/default.nix new file mode 100644 index 00000000..0a0e6d99 --- /dev/null +++ b/modules/plugins/mini/comment/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./comment.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 748cd2f8..dd3bbf58 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -9,5 +9,6 @@ ./bufremove ./clue ./colors + ./comment ]; }