mini/diff: init

This commit is contained in:
LilleAila 2025-01-17 19:32:56 +01:00
parent 887e563076
commit 4b4423af91
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 62 additions and 0 deletions

View file

@ -65,6 +65,7 @@
- `mini.colors`
- `mini.comment`
- `mini.completion`
- `mini.diff`
[kaktu5](https://github.com/kaktu5):

View file

@ -1112,6 +1112,22 @@
"type": "github"
}
},
"plugin-mini-diff": {
"flake": false,
"locked": {
"lastModified": 1735324663,
"narHash": "sha256-dRvW/1lfVShiHmRU0mQA5g5xDyQ0EVtVLLZ0y6WSedg=",
"owner": "echasnovski",
"repo": "mini.diff",
"rev": "00f072250061ef498f91ed226918c9ec31a416a4",
"type": "github"
},
"original": {
"owner": "echasnovski",
"repo": "mini.diff",
"type": "github"
}
},
"plugin-minimap-vim": {
"flake": false,
"locked": {
@ -2319,6 +2335,7 @@
"plugin-mini-colors": "plugin-mini-colors",
"plugin-mini-comment": "plugin-mini-comment",
"plugin-mini-completion": "plugin-mini-completion",
"plugin-mini-diff": "plugin-mini-diff",
"plugin-minimap-vim": "plugin-minimap-vim",
"plugin-modes-nvim": "plugin-modes-nvim",
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",

View file

@ -800,5 +800,10 @@
url = "github:echasnovski/mini.completion";
flake = false;
};
plugin-mini-diff = {
url = "github:echasnovski/mini.diff";
flake = false;
};
};
}

View file

@ -11,5 +11,6 @@
./colors
./comment
./completion
./diff
];
}

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

View file

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