Support `diff.colorMoved`
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 5.6k
- Forks
- 357
- Avg merge
- 15h 47m
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
I want to be able to identify moved sections of code more easily in diffs. Git has diff.colorMoved/--color-moved which helps, but Neogit strips this.
Describe the solution you'd like
If diff.colorMoved is set in your Git config, these colors should be shown in diffs e.g. the staged/unstaged views on the main NeogitStatus page.
The colors should also be sent to log_pager so it can use them. For example, delta can parse the colors and preserve them, but using delta as your log_pager acts as if diff.colorMoved is not set because Neogit strips the colors before passing it to log_pager.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace how Neogit obtains and strips Git diff colors for the staged and unstaged views on the main NeogitStatus page, then follow the path that invokes log_pager. Check behavior with diff.colorMoved configured and with a pager such as delta; done means moved sections retain their configured colors in the views and those colors reach log_pager.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, lua, neovim
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100