mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/tinygit: init
This commit is contained in:
parent
f464541b18
commit
757e02a183
2 changed files with 247 additions and 0 deletions
62
plugins/by-name/tinygit/default.nix
Normal file
62
plugins/by-name/tinygit/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "tinygit";
|
||||
packPathName = "nvim-tinygit";
|
||||
package = "nvim-tinygit";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
extraOptions = {
|
||||
curlPackage = lib.mkPackageOption pkgs "curl" {
|
||||
nullable = true;
|
||||
};
|
||||
|
||||
gitPackage = lib.mkPackageOption pkgs "git" {
|
||||
nullable = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
extraPackages = [
|
||||
cfg.curlPackage
|
||||
cfg.gitPackage
|
||||
];
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue