refactor: centralize integration metadata #146

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

Original issue: barrettruth/diffs.nvim#341
Original author: barrettruth
Original date: 2026-05-13T17:33:56Z

Tracked By

Context

This is pre-v0.4.0 cleanup that should land on main before the hard-removal branch. It must preserve current v0.3.x deprecation behavior, including temporary table forms for integrations.

Problem

Integration ownership is split across config defaults, validation/migration, filetype computation, plugin bootstrap hooks, and runtime attach checks. The same integration set is repeated across:

  • lua/diffs/config.lua
  • plugin/diffs.lua
  • lua/diffs/runtime/attach.lua

That makes the eventual hard-removal review harder because integration metadata is duplicated before and after normalization.

Scope

Extract integration keys, defaults, and filetype patterns into a small internal module. Do not rewrite integration implementations. Preserve current table-to-boolean deprecation/migration behavior.

Acceptance Criteria

  • one source of truth for integration keys and filetype patterns
  • config.new() returns the same integration defaults
  • current integration table deprecation/migration behavior is unchanged
  • plugin startup registers the same FileType autocmds
  • Neogit/Neojj disabled flags still prevent attach behavior

Suggested Verification

direnv exec . busted spec/config_spec.lua spec/runtime_spec.lua spec/plugin_spec.lua spec/neogit_integration_spec.lua spec/neojj_integration_spec.lua
> Original issue: barrettruth/diffs.nvim#341 > Original author: `barrettruth` > Original date: 2026-05-13T17:33:56Z ## Tracked By - #315 ## Context This is pre-v0.4.0 cleanup that should land on `main` before the hard-removal branch. It must preserve current v0.3.x deprecation behavior, including temporary table forms for integrations. ## Problem Integration ownership is split across config defaults, validation/migration, filetype computation, plugin bootstrap hooks, and runtime attach checks. The same integration set is repeated across: - `lua/diffs/config.lua` - `plugin/diffs.lua` - `lua/diffs/runtime/attach.lua` That makes the eventual hard-removal review harder because integration metadata is duplicated before and after normalization. ## Scope Extract integration keys, defaults, and filetype patterns into a small internal module. Do not rewrite integration implementations. Preserve current table-to-boolean deprecation/migration behavior. ## Acceptance Criteria - one source of truth for integration keys and filetype patterns - `config.new()` returns the same integration defaults - current integration table deprecation/migration behavior is unchanged - plugin startup registers the same FileType autocmds - Neogit/Neojj disabled flags still prevent attach behavior ## Suggested Verification ```sh direnv exec . busted spec/config_spec.lua spec/runtime_spec.lua spec/plugin_spec.lua spec/neogit_integration_spec.lua spec/neojj_integration_spec.lua ```
barrettruth 2026-09-21 18:12:32 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
barrettruth/diffs.nvim#146
No description provided.