diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 824dc305..d15e5609 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -80,6 +80,7 @@ - `mini.map` - `mini.misc` - `mini.move` + - `mini.notify` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 03d1e0b5..6a35b799 100644 --- a/flake.lock +++ b/flake.lock @@ -1352,6 +1352,22 @@ "type": "github" } }, + "plugin-mini-notify": { + "flake": false, + "locked": { + "lastModified": 1736790793, + "narHash": "sha256-q27j14OV6LAfoxeqBG75GSiqtqmW37GOPHpmA2fD4gs=", + "owner": "echasnovski", + "repo": "mini.notify", + "rev": "05e598d5b349bd66404d576e6a4d4340aea5f194", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.notify", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2574,6 +2590,7 @@ "plugin-mini-map": "plugin-mini-map", "plugin-mini-misc": "plugin-mini-misc", "plugin-mini-move": "plugin-mini-move", + "plugin-mini-notify": "plugin-mini-notify", "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 def1cd8c..368fc4f7 100644 --- a/flake.nix +++ b/flake.nix @@ -875,5 +875,10 @@ url = "github:echasnovski/mini.move"; flake = false; }; + + plugin-mini-notify = { + url = "github:echasnovski/mini.notify"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index a1c5a191..315d3b0c 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -26,5 +26,6 @@ ./map ./misc ./move + ./notify ]; } diff --git a/modules/plugins/mini/notify/config.nix b/modules/plugins/mini/notify/config.nix new file mode 100644 index 00000000..2a5ff46e --- /dev/null +++ b/modules/plugins/mini/notify/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.notify; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-notify"]; + + pluginRC.mini-notify = entryAnywhere '' + require("mini.notify").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/notify/default.nix b/modules/plugins/mini/notify/default.nix new file mode 100644 index 00000000..0f809b7a --- /dev/null +++ b/modules/plugins/mini/notify/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./notify.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/notify/notify.nix b/modules/plugins/mini/notify/notify.nix new file mode 100644 index 00000000..76e8c135 --- /dev/null +++ b/modules/plugins/mini/notify/notify.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.notify = { + enable = mkEnableOption "mini.notify"; + setupOpts = mkPluginSetupOption "mini.notify" {}; + }; +}