Skip to content

scm.nvim v0.2.0

Choose a tag to compare

@HundredBillion HundredBillion released this 17 Nov 04:03
c9e43a6

scm.nvim v0.2.0 turns the Panel into a working Source Control view: it is laid out like VS Code's, it can stage, unstage, discard and commit, and it opens at once.

  • VS Code's Source Control layout: a commit box and Commit button, groups with counts (Merge Changes, Staged Changes, Changes, Committed), and file rows with an icon, the directory dimmed beside the name, and a coloured status letter. t switches between list and tree. (#14)
  • Stage, unstage, discard and commit: s, u and x act on a file, a folder or a whole group, and Ctrl-Enter (⌘Enter in the dock) commits. Discard always asks first and defaults to Cancel. Every path is passed to git as the exact file it names, so an oddly named file cannot widen a discard. (#14)
  • No Snacks, no file tree: SCM draws its own Panel and scans the editor window's working directory. The Snacks Panel and the lazygit triggers are gone. (#9, #10)
  • Opens instantly: the Panel shows the last known rows at once and fills each repository as it lands, where it used to wait several seconds for the slowest one. Repository discovery no longer searches inside repositories or build folders, which had left the Panel empty on large project folders. (#7, #8)
  • Less background Git work: startup warms only working-tree and staged status, and committed history fills in after the Panel opens. (#12)
  • Very large change sets: a group lists at most group_limit files (default 1000) and keeps its true count, so a branch that differs in tens of thousands of files no longer drops the native Panel. (#15)
  • Fixes: Enter reopens a collapsed repository (#16); opening a file replaces a start screen instead of splitting beside it (#17); the Follow shortcut keeps working while the sidebar has focus (#4).

Breaking: the Snacks Panel integration and the lazygit hand-off are removed. Coordinating with a file explorer is now left to your config.

Compatibility

The native dock needs a host that draws decorated list rows (virtual-list-rows-v2): Sprite 0.7.0 with sprite.nvim v0.6.0 or later. With an older host the Panel falls back to the terminal renderer, which shows the same rows as text. After upgrading Sprite, run :Lazy update scm.nvim sprite.nvim and restart Neovim.

Validation

The headless test suite passed in CI on the tagged commit.