refactor: extract generated buffer metadata helpers #147
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
barrettruth/diffs.nvim#147
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracked By
Context
Generated
diffs://buffers are now a large part of the plugin surface. Their identity and reload metadata are still a cross-module convention rather than an owned API.Problem
lua/diffs/commands.luaownsdiffs_sourceschema review, generated buffer var setup, and reload dispatch. Nearby modules also read or normalize the same state directly:lua/diffs/split.lualua/diffs/lists.lualua/diffs/actions.lualua/diffs/hunks.luaThat makes generated view identity harder to reason about while reviewing config and docs changes.
Scope
Add a small generated-buffer metadata module for buffer-local accessors and source constructors/normalizers around:
diffs_repo_rootdiffs_specdiffs_hunksdiffs_sourceKeep
commands.read_buffer()behavior unchanged.Acceptance Criteria
diffs://buffer names are unchangedcommands.luano longer defines the whole generated-source validator inlineSuggested Readiness