feat: add per-file-status theme colors for files panel#5468
Open
PeterTimCousins wants to merge 1 commit intojesseduffield:masterfrom
Open
feat: add per-file-status theme colors for files panel#5468PeterTimCousins wants to merge 1 commit intojesseduffield:masterfrom
PeterTimCousins wants to merge 1 commit intojesseduffield:masterfrom
Conversation
Add configurable colors for each git file status character (modified,
deleted, untracked, added, renamed, copied) in the theme config. Each
color falls back to unstagedChangesColor when not set, preserving
existing behavior.
New theme config keys:
- modifiedColor: color for modified files (M)
- deletedColor: color for deleted files (D)
- untrackedColor: color for untracked files (?)
- addedColor: color for added/staged new files (A)
- renamedColor: color for renamed files (R)
- copiedColor: color for copied files (C)
Example config:
gui:
theme:
modifiedColor:
- '#e0af68'
deletedColor:
- '#f7768e'
untrackedColor:
- '#9ece6a'
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds configurable theme colors for each git file status type in the files panel. Currently, all file statuses share
unstagedChangesColor(or hardcoded colors). This PR lets users set distinct colors per status — for example, amber for modified, red for deleted, green for untracked.Each new color key falls back to
unstagedChangesColor(or a sensible default) when not configured, so existing configs are unaffected.New theme config keys
modifiedColorunstagedChangesColordeletedColorunstagedChangesColoruntrackedColorunstagedChangesColoraddedColorrenamedColorunstagedChangesColorcopiedColorExample config
Files changed
pkg/config/user_config.go— new color fields onThemeConfig+ defaultspkg/theme/theme.go— new theme variables + fallback logic inUpdateTheme()pkg/gui/presentation/files.go—colorForStatusChar()maps each status char to its theme color,getColorForChangeStatus()updated to use theme colors