mini/sessions: init

This commit is contained in:
LilleAila 2025-01-17 21:08:34 +01:00
parent af36e185b5
commit 39d8f52f0e
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 62 additions and 0 deletions

View file

@ -84,6 +84,7 @@
- `mini.operators`
- `mini.pairs`
- `mini.pick`
- `mini.sessions`
[kaktu5](https://github.com/kaktu5):

View file

@ -1416,6 +1416,22 @@
"type": "github"
}
},
"plugin-mini-sessions": {
"flake": false,
"locked": {
"lastModified": 1735582250,
"narHash": "sha256-vyn8MGyOWFgJ5QVvjYb7K1cKDtg9qWnWYMNf80+kpHk=",
"owner": "echasnovski",
"repo": "mini.sessions",
"rev": "71c9ae596664ac110560d27eb928fc24e22bc53d",
"type": "github"
},
"original": {
"owner": "echasnovski",
"repo": "mini.sessions",
"type": "github"
}
},
"plugin-minimap-vim": {
"flake": false,
"locked": {
@ -2642,6 +2658,7 @@
"plugin-mini-operators": "plugin-mini-operators",
"plugin-mini-pairs": "plugin-mini-pairs",
"plugin-mini-pick": "plugin-mini-pick",
"plugin-mini-sessions": "plugin-mini-sessions",
"plugin-minimap-vim": "plugin-minimap-vim",
"plugin-modes-nvim": "plugin-modes-nvim",
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",

View file

@ -895,5 +895,10 @@
url = "github:echasnovski/mini.pick";
flake = false;
};
plugin-mini-sessions = {
url = "github:echasnovski/mini.sessions";
flake = false;
};
};
}

View file

@ -30,5 +30,6 @@
./operators
./pairs
./pick
./sessions
];
}

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.sessions;
in {
vim = mkIf cfg.enable {
startPlugins = ["mini-sessions"];
pluginRC.mini-sessions = entryAnywhere ''
require("mini.sessions").setup(${toLuaObject cfg.setupOpts})
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./sessions.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.sessions = {
enable = mkEnableOption "mini.sessions";
setupOpts = mkPluginSetupOption "mini.sessions" {};
};
}