mini/statusline: init

This commit is contained in:
LilleAila 2025-01-17 21:16:11 +01:00
parent f7abf7577c
commit d1fa88595b
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 62 additions and 0 deletions

View file

@ -88,6 +88,7 @@
- `mini.snippets`
- `mini.splitjoin`
- `mini.starter`
- `mini.statusline`
[kaktu5](https://github.com/kaktu5):

View file

@ -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",

View file

@ -915,5 +915,10 @@
url = "github:echasnovski/mini.starter";
flake = false;
};
plugin-mini-statusline = {
url = "github:echasnovski/mini.statusline";
flake = false;
};
};
}

View file

@ -34,5 +34,6 @@
./snippets
./splitjoin
./starter
./statusline
];
}

View file

@ -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})
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./statusline.nix
./config.nix
];
}

View file

@ -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" {};
};
}