nix-community.nixvim/plugins/by-name/tinygit/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

50 lines
1.3 KiB
Nix

{
lib,
...
}:
lib.nixvim.plugins.mkNeovimPlugin {
name = "tinygit";
packPathName = "nvim-tinygit";
package = "nvim-tinygit";
description = "A lightweight bundle of commands focused on quick and streamlined git operations.";
maintainers = [ lib.maintainers.GaetanLepage ];
dependencies = [
"curl"
"git"
];
settingsExample = {
stage.moveToNextHunkOnStagingToggle = true;
commit = {
keepAbortedMsgSecs.__raw = "60 * 10";
spellcheck = true;
subject = {
autoFormat.__raw = ''
function(subject)
-- remove trailing dot https://commitlint.js.org/reference/rules.html#body-full-stop
subject = subject:gsub("%.$", "")
-- sentence case of title after the type
subject = subject
:gsub("^(%w+: )(.)", function(c1, c2) return c1 .. c2:lower() end) -- no scope
:gsub("^(%w+%b(): )(.)", function(c1, c2) return c1 .. c2:lower() end) -- with scope
return subject
end
'';
enforceType = true;
};
};
statusline = {
blame = {
hideAuthorNames = [
"John Doe"
"johndoe"
];
ignoreAuthors = [ "🤖 automated" ];
maxMsgLen = 55;
};
};
};
}