Skip to content

Conversation

@esmuellert
Copy link
Owner

Summary

Add diffview-style keymaps for file operations in explorer panel.

Changes

New Explorer Keymaps

Key Action Description
- toggle_stage Stage/unstage the selected file
S stage_all Stage all files
U unstage_all Unstage all files
X restore Discard changes / delete untracked file

Implementation Details

  • Added async git operations in git.lua: stage_file, unstage_file, stage_all, unstage_all, restore_file, delete_untracked
  • Added action functions in actions.lua for each keymap
  • Restore (X) shows a confirmation prompt: (D)iscard, [C]ancel
  • Untracked files are deleted with git clean -f
  • Auto-refresh via existing .git directory watcher - no manual refresh needed

Closes

Add diffview-style keymaps for file operations in explorer:
- `-` Toggle stage/unstage for selected file
- `S` Stage all files
- `U` Unstage all files
- `X` Discard changes / delete untracked file (with confirmation)

Closes #63
Closes #64
@esmuellert esmuellert enabled auto-merge January 10, 2026 06:52
@esmuellert esmuellert merged commit 9add439 into main Jan 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore files feature request: Add keymaps to stage/unstage files

2 participants