diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c7e0dbe6..54ff3b0c 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -88,6 +88,7 @@ - `mini.snippets` - `mini.splitjoin` - `mini.starter` + - `mini.statusline` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 8cb6430b..cd751c01 100644 --- a/flake.lock +++ b/flake.lock @@ -1480,6 +1480,22 @@ "type": "github" } }, + "plugin-mini-statusline": { + "flake": false, + "locked": { + "lastModified": 1735582251, + "narHash": "sha256-AQ2N93JDjtFpgerWTzRspmxrl9oQuALbeCUxBO4ZPqo=", + "owner": "echasnovski", + "repo": "mini.statusline", + "rev": "1b0edf76fe2af015f8c989385ff949f1db7aade2", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.statusline", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2710,6 +2726,7 @@ "plugin-mini-snippets": "plugin-mini-snippets", "plugin-mini-splitjoin": "plugin-mini-splitjoin", "plugin-mini-starter": "plugin-mini-starter", + "plugin-mini-statusline": "plugin-mini-statusline", "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 716c1247..83a9d88a 100644 --- a/flake.nix +++ b/flake.nix @@ -915,5 +915,10 @@ url = "github:echasnovski/mini.starter"; flake = false; }; + + plugin-mini-statusline = { + url = "github:echasnovski/mini.statusline"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 8cc30c8a..d68660fd 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -34,5 +34,6 @@ ./snippets ./splitjoin ./starter + ./statusline ]; } diff --git a/modules/plugins/mini/statusline/config.nix b/modules/plugins/mini/statusline/config.nix new file mode 100644 index 00000000..9f89b8a4 --- /dev/null +++ b/modules/plugins/mini/statusline/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.statusline; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-statusline"]; + + pluginRC.mini-statusline = entryAnywhere '' + require("mini.statusline").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/statusline/default.nix b/modules/plugins/mini/statusline/default.nix new file mode 100644 index 00000000..9fd274e2 --- /dev/null +++ b/modules/plugins/mini/statusline/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./statusline.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/statusline/statusline.nix b/modules/plugins/mini/statusline/statusline.nix new file mode 100644 index 00000000..9e1301cf --- /dev/null +++ b/modules/plugins/mini/statusline/statusline.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.statusline = { + enable = mkEnableOption "mini.statusline"; + setupOpts = mkPluginSetupOption "mini.statusline" {}; + }; +}