diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index e654f595..7523aa22 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -58,6 +58,7 @@ - `mini.align` - `mini.animate` - `mini.base16` + - `mini.basics` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 862e7550..2c580ea0 100644 --- a/flake.lock +++ b/flake.lock @@ -1000,6 +1000,22 @@ "type": "github" } }, + "plugin-mini-basics": { + "flake": false, + "locked": { + "lastModified": 1730194519, + "narHash": "sha256-R8POaMcgb6SBOxIpanZsswieywapnU7zDNjQMRTkR8U=", + "owner": "echasnovski", + "repo": "mini.basics", + "rev": "67c10b3436d5d3b892715137f4773e71c6753b13", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.basics", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2200,6 +2216,7 @@ "plugin-mini-align": "plugin-mini-align", "plugin-mini-animate": "plugin-mini-animate", "plugin-mini-base16": "plugin-mini-base16", + "plugin-mini-basics": "plugin-mini-basics", "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 b5b9629e..c14323b2 100644 --- a/flake.nix +++ b/flake.nix @@ -765,5 +765,10 @@ url = "github:echasnovski/mini.base16"; flake = false; }; + + plugin-mini-basics = { + url = "github:echasnovski/mini.basics"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/basics/basics.nix b/modules/plugins/mini/basics/basics.nix new file mode 100644 index 00000000..b2a4ff30 --- /dev/null +++ b/modules/plugins/mini/basics/basics.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.basics = { + enable = mkEnableOption "mini.basics"; + setupOpts = mkPluginSetupOption "mini.basics" {}; + }; +} diff --git a/modules/plugins/mini/basics/config.nix b/modules/plugins/mini/basics/config.nix new file mode 100644 index 00000000..9893ef42 --- /dev/null +++ b/modules/plugins/mini/basics/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.basics; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-basics"]; + + pluginRC.mini-basics = entryAnywhere '' + require("mini.basics").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/basics/default.nix b/modules/plugins/mini/basics/default.nix new file mode 100644 index 00000000..15bf750b --- /dev/null +++ b/modules/plugins/mini/basics/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./basics.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index ecf80efd..8ec59e16 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -4,5 +4,6 @@ ./align ./animate # ./base16 # NOTE: configured in theme/ + ./basics ]; }