NeogitOrg / NeogitOrg/neogit

Have a "stage specific lines" flow with `log_pager`

Open
#1,973 0 comments 0 reactions 0 assignees View on GitHub

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.

Setting a log_pager helps make diffs more readable, but if it does anything other than simple changes such as colors, selecting a range of lines to do e.g. a partial stage breaks. If you select a line, it will actually stage a lower line due to Neogit not being aware of how the lines have been rearranged in the view. This means you have to choose between a workflow allowing you to select specific lines and using a thorough log_pager.

Describe the solution you'd like

It would be great if there was a way to customise when log_pager is used. This would likely have to be a toggle as there is value in both selecting specific lines and seeing a pretty diff on the main NeogitStatus page. Being able to quickly toggle between the selectable view and the log_pager view would mean you could go from understanding the diff to actually staging it efficiently.

Describe alternatives you've considered

You can choose between using log_pager and selecting specific lines but ideally you could do both.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the log_pager configuration and the stage-specific-lines flow in the NeogitStatus page. Trace how the pager changes displayed diff lines and how partial staging selects them; done means users can toggle between pager and selectable views without staging the wrong lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, lua, neovim
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.