git status integration #20

Closed
opened 2026-09-21 18:54:12 +00:00 by barrettruth · 2 comments
Owner

Original issue: barrettruth/canola.nvim#121
Original author: barrettruth
Original date: 2026-03-11T19:01:42Z

Built-in git status integration for canola, replacing the need for external plugins like oil-git-status.nvim and oil-git.nvim.

Consolidates upstream requests:

Requirements

  • Per-file git status indicators (modified, staged, untracked, ignored, conflicted)
  • Per-directory aggregate status (dirty if any child is modified/untracked)
  • Async rendering: directory listing renders immediately, git status populates after git status completes
  • Configurable: opt-in column, off by default

Design Constraints

stevearc explicitly declined to build this into oil due to performance concerns on large repos — git status can take 10-20s. He endorsed the extmark/sign approach used by oil-git-status.nvim as the right architecture: render the buffer first, then overlay git status asynchronously via extmarks.

Key decisions:

  • Column vs. signs/extmarks: extmarks avoid blocking the render pipeline and don't require changes to parser.parse_line
  • Refresh strategy: re-run on OilReadPost, directory change, and FocusGained
  • Scope: local filesystem adapter only (SSH/S3/trash don't have git)

Prior Art

> Original issue: barrettruth/canola.nvim#121 > Original author: `barrettruth` > Original date: 2026-03-11T19:01:42Z Built-in git status integration for canola, replacing the need for external plugins like [oil-git-status.nvim](https://github.com/refractalize/oil-git-status.nvim) and [oil-git.nvim](https://github.com/malewicz1337/oil-git.nvim). Consolidates upstream requests: - stevearc/oil.nvim#85 — git status column - stevearc/oil.nvim#571 — per-directory callback before `highlight_filename` (motivated by git status) ## Requirements - Per-file git status indicators (modified, staged, untracked, ignored, conflicted) - Per-directory aggregate status (dirty if any child is modified/untracked) - Async rendering: directory listing renders immediately, git status populates after `git status` completes - Configurable: opt-in column, off by default ## Design Constraints stevearc explicitly declined to build this into oil due to performance concerns on large repos — `git status` can take 10-20s. He endorsed the extmark/sign approach used by `oil-git-status.nvim` as the right architecture: render the buffer first, then overlay git status asynchronously via extmarks. Key decisions: - **Column vs. signs/extmarks**: extmarks avoid blocking the render pipeline and don't require changes to `parser.parse_line` - **Refresh strategy**: re-run on `OilReadPost`, directory change, and `FocusGained` - **Scope**: local filesystem adapter only (SSH/S3/trash don't have git) ## Prior Art - [oil-git-status.nvim](https://github.com/refractalize/oil-git-status.nvim) — async extmark signs, most popular - [oil-git.nvim](https://github.com/malewicz1337/oil-git.nvim) — async git status integration
barrettruth added this to the v1.1 milestone 2026-09-21 18:54:12 +00:00
Author
Owner

Original comment: barrettruth/canola.nvim#121, comment 4069829468
Original author: barrettruth
Original date: 2026-03-16T18:44:39Z

consider oil-git.nvim

also, consider showing git files integrated by default - imagine

vim.g.canola.git.untracked...

> Original comment: barrettruth/canola.nvim#121, comment 4069829468 > Original author: `barrettruth` > Original date: 2026-03-16T18:44:39Z consider oil-git.nvim also, consider showing git files integrated by default - imagine vim.g.canola.git.untracked...
Author
Owner

Original comment: barrettruth/canola.nvim#121, comment 4100786796
Original author: barrettruth
Original date: 2026-03-20T20:26:46Z

Moved to canola-collection scope. Git status display belongs in canola-git, not core.

> Original comment: barrettruth/canola.nvim#121, comment 4100786796 > Original author: `barrettruth` > Original date: 2026-03-20T20:26:46Z Moved to canola-collection scope. Git status display belongs in `canola-git`, not core.
Sign in to join this conversation.
No description provided.