The Git Module integrates git functionality directly into Neovim using the powerful gitsigns.nvim plugin. This module enables efficient interaction with git repositories through intuitive key mappings and enhanced visual feedback.
To enable this module, add the following to your Nix configuration:
# Add to your Nix configuration
modules.imports = [
inputs.nvix.nvixModules.utils
inputs.nvix.nvixModules.git
];
- Git Integration: Perform git actions directly from Neovim.
- Inline Feedback: View git diff and blame information inline.
- Convenient Keymaps: Intuitive keybindings for common git operations.
Key | Action |
---|---|
<Leader>ghS |
Stage Buffer |
<Leader>ghu |
Undo Stage Hunk |
<Leader>ghR |
Reset Buffer |
<Leader>ghp |
Preview Hunk Inline |
<Leader>ghb |
Blame Line (Full) |
<Leader>ghB |
Blame Buffer |
<Leader>gb |
Blame Line |
<Leader>ghd |
Diff This |
<Leader>ghD |
Diff This (~ ) |
[H |
Navigate to Previous Hunk |
]H |
Navigate to Next Hunk |
<Leader>ghs |
Stage Hunk |
<Leader>ghr |
Reset Hunk |
Key | Action |
---|---|
<Leader>ghs |
Stage Selected Hunk |
<Leader>ghr |
Reset Selected Hunk |
Key | Action |
---|---|
ih |
GitSigns Select Hunk |
This module leverages gitsigns.nvim
for its functionality, providing:
- Hunk Navigation: Quickly jump between git hunks.
- Inline Previews: Preview changes in the current buffer.
- Git Blame: Display blame information inline.
- This module is ideal for users who frequently work with git repositories.
- The keymaps are designed to be intuitive and non-intrusive, blending seamlessly into your workflow.
Customize these mappings further to fit your personal preferences.