diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 0c38c1ad..313d2e41 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -90,6 +90,7 @@ - `mini.starter` - `mini.statusline` - `mini.surround` + - `mini.tabline` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 3c754e31..a1996572 100644 --- a/flake.lock +++ b/flake.lock @@ -1512,6 +1512,22 @@ "type": "github" } }, + "plugin-mini-tabline": { + "flake": false, + "locked": { + "lastModified": 1729176541, + "narHash": "sha256-nucUqSN8w2xBnDp1dFBgRVVvfVoqZMdx7Zj78wdFAP0=", + "owner": "echasnovski", + "repo": "mini.tabline", + "rev": "06ef4ecaeca2e362c7d31113435d86d144b3cbbe", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.tabline", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2744,6 +2760,7 @@ "plugin-mini-starter": "plugin-mini-starter", "plugin-mini-statusline": "plugin-mini-statusline", "plugin-mini-surround": "plugin-mini-surround", + "plugin-mini-tabline": "plugin-mini-tabline", "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 0c030c5f..d81a87d4 100644 --- a/flake.nix +++ b/flake.nix @@ -925,5 +925,10 @@ url = "github:echasnovski/mini.surround"; flake = false; }; + + plugin-mini-tabline = { + url = "github:echasnovski/mini.tabline"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 0acb6344..e18ecbba 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -36,5 +36,6 @@ ./starter ./statusline ./surround + ./tabline ]; } diff --git a/modules/plugins/mini/tabline/config.nix b/modules/plugins/mini/tabline/config.nix new file mode 100644 index 00000000..b807e563 --- /dev/null +++ b/modules/plugins/mini/tabline/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.tabline; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-tabline"]; + + pluginRC.mini-tabline = entryAnywhere '' + require("mini.tabline").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/tabline/default.nix b/modules/plugins/mini/tabline/default.nix new file mode 100644 index 00000000..38462e0f --- /dev/null +++ b/modules/plugins/mini/tabline/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./tabline.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/tabline/tabline.nix b/modules/plugins/mini/tabline/tabline.nix new file mode 100644 index 00000000..7dc48222 --- /dev/null +++ b/modules/plugins/mini/tabline/tabline.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.tabline = { + enable = mkEnableOption "mini.tabline"; + setupOpts = mkPluginSetupOption "mini.tabline" {}; + }; +}