Choose the order of files in a Hunk review.
I use Hunk and Lazygit. I would
review a change in one, switch to the other, and lose my place because the same
files appeared in a different order. This extension gives Hunk a few useful
orders, including Lazygit's mixed order.
| Value | Order |
|---|---|
mixed |
Default. Files and folders sort together. Matches Lazygit's mixed order. |
filesFirst |
Files before folders at each level. |
foldersFirst |
Folders before files at each level. |
hunk |
Keep Hunk's native order. |
Extension sorts keep tracked files above untracked files.
Add this to ~/.config/hunk/config.toml or .hunk/config.toml:
[extension.hunk-file-order]
sortOrder = "mixed" # hunk | mixed | filesFirst | foldersFirst
caseSensitive = trueThe defaults are mixed and case-sensitive sorting.
With caseSensitive = false, the extension uses JavaScript toLowerCase().
Some uncommon Unicode names may sort differently in other tools.
hunk extension install astwys/hunk-file-orderTo try a checkout without installing it:
hunk diff --extension /path/to/hunk-file-orderHunk does not expose merge-conflict state to changeset transforms. Conflicted files therefore sort with the other tracked files.
pnpm install
pnpm test
pnpm typecheck
pnpm dev