Skip to content

Commit

Permalink
mini/git: add keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Feb 18, 2025
1 parent 6e4c22d commit 50c2f27
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/nixvim/plugins/mini/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
./diff.nix
./files.nix
./fuzzy.nix
./git.nix
./hipatterns.nix
./indentscope.nix
./map.nix
Expand All @@ -28,7 +29,6 @@
align = { };
basics = { };
bracketed = { };
git = { };
icons = { };
snippets = {
snippets = {
Expand Down
39 changes: 39 additions & 0 deletions modules/nixvim/plugins/mini/git.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ lib, config, ... }:
{
plugins = {
mini = {
enable = true;

modules = {
git = { };
};
};
};

keymaps = lib.mkIf (config.plugins.mini.enable && lib.hasAttr "git" config.plugins.mini.modules) [
{
mode = "n";
key = "<leader>gD";
action = "<CMD>lua MiniGit.show_diff_source()<CR>";
options = {
desc = "Show diff source";
};
}
{
mode = "";
key = "<leader>gH";
action = "<CMD>lua MiniGit.show_range_history()<CR>";
options = {
desc = "Show range history";
};
}
{
mode = "n";
key = "<leader>g.";
action = "<CMD>lua MiniGit.show_at_cursor()<CR>";
options = {
desc = "Show git context";
};
}
];
}

0 comments on commit 50c2f27

Please sign in to comment.