mini/files: init

This commit is contained in:
LilleAila 2025-01-17 20:19:02 +01:00
parent 3533d5bcbd
commit 7472cac221
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 62 additions and 0 deletions

View file

@ -68,6 +68,7 @@
- `mini.diff`
- `mini.doc`
- `mini.extra`
- `mini.files`
[kaktu5](https://github.com/kaktu5):

View file

@ -1160,6 +1160,22 @@
"type": "github"
}
},
"plugin-mini-files": {
"flake": false,
"locked": {
"lastModified": 1736535707,
"narHash": "sha256-UHW78m4BiYMMrABwdkyyzQUENgQrVFbWJnmNdRMtr0w=",
"owner": "echasnovski",
"repo": "mini.files",
"rev": "d0f03a5c38836fd2cce3dc80734124959002078c",
"type": "github"
},
"original": {
"owner": "echasnovski",
"repo": "mini.files",
"type": "github"
}
},
"plugin-minimap-vim": {
"flake": false,
"locked": {
@ -2370,6 +2386,7 @@
"plugin-mini-diff": "plugin-mini-diff",
"plugin-mini-doc": "plugin-mini-doc",
"plugin-mini-extra": "plugin-mini-extra",
"plugin-mini-files": "plugin-mini-files",
"plugin-minimap-vim": "plugin-minimap-vim",
"plugin-modes-nvim": "plugin-modes-nvim",
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",

View file

@ -815,5 +815,10 @@
url = "github:echasnovski/mini.extra";
flake = false;
};
plugin-mini-files = {
url = "github:echasnovski/mini.files";
flake = false;
};
};
}

View file

@ -14,5 +14,6 @@
./diff
./doc
./extra
./files
];
}

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

View file

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