diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index eb019afa..c7e0dbe6 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -87,6 +87,7 @@ - `mini.sessions` - `mini.snippets` - `mini.splitjoin` + - `mini.starter` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index b74f5905..8cb6430b 100644 --- a/flake.lock +++ b/flake.lock @@ -1464,6 +1464,22 @@ "type": "github" } }, + "plugin-mini-starter": { + "flake": false, + "locked": { + "lastModified": 1736858747, + "narHash": "sha256-pJYkZUo+L3IeGCRdTipqTzMv+HatpNnyRxshaygKtIw=", + "owner": "echasnovski", + "repo": "mini.starter", + "rev": "4b257cfc93241e8c8cde3f9302d1616ad4e0d036", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.starter", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2693,6 +2709,7 @@ "plugin-mini-sessions": "plugin-mini-sessions", "plugin-mini-snippets": "plugin-mini-snippets", "plugin-mini-splitjoin": "plugin-mini-splitjoin", + "plugin-mini-starter": "plugin-mini-starter", "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 be51c405..716c1247 100644 --- a/flake.nix +++ b/flake.nix @@ -910,5 +910,10 @@ url = "github:echasnovski/mini.splitjoin"; flake = false; }; + + plugin-mini-starter = { + url = "github:echasnovski/mini.starter"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 92bd13ce..8cc30c8a 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -33,5 +33,6 @@ ./sessions ./snippets ./splitjoin + ./starter ]; } diff --git a/modules/plugins/mini/starter/config.nix b/modules/plugins/mini/starter/config.nix new file mode 100644 index 00000000..35b5c950 --- /dev/null +++ b/modules/plugins/mini/starter/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.starter; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-starter"]; + + pluginRC.mini-starter = entryAnywhere '' + require("mini.starter").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/starter/default.nix b/modules/plugins/mini/starter/default.nix new file mode 100644 index 00000000..0c98acc6 --- /dev/null +++ b/modules/plugins/mini/starter/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./starter.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/starter/starter.nix b/modules/plugins/mini/starter/starter.nix new file mode 100644 index 00000000..cb42061d --- /dev/null +++ b/modules/plugins/mini/starter/starter.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.starter = { + enable = mkEnableOption "mini.starter"; + setupOpts = mkPluginSetupOption "mini.starter" {}; + }; +}