refactor(init): extract scope and remote-url helpers from init.lua #518

Closed
opened 2026-04-29 00:31:20 +00:00 by barrettruth · 1 comment
barrettruth commented 2026-04-29 00:31:20 +00:00

The remaining scope/current-repo layer in lua/forge/init.lua still bundles:

  • file_loc
  • remote_web_url
  • scope_from_url
  • scope_repo_arg
  • scope_key
  • current_scope
  • remote_name
  • remote_ref

That keeps consumers like routes.lua, ops.lua, context.lua, and the
backend adapters reaching back through the top-level forge facade.

A good outcome here is a dedicated helper module for current-repo / scope /
web-url responsibilities, with internal consumers depending on that module
directly and init.lua left as a thin public facade.

The remaining scope/current-repo layer in `lua/forge/init.lua` still bundles: - `file_loc` - `remote_web_url` - `scope_from_url` - `scope_repo_arg` - `scope_key` - `current_scope` - `remote_name` - `remote_ref` That keeps consumers like `routes.lua`, `ops.lua`, `context.lua`, and the backend adapters reaching back through the top-level `forge` facade. A good outcome here is a dedicated helper module for current-repo / scope / web-url responsibilities, with internal consumers depending on that module directly and `init.lua` left as a thin public facade.
barrettruth commented 2026-04-29 02:11:23 +00:00

Closed by #524 (f410333), which extracted the repo/scope helper layer into lua/forge/repo.lua and left lua/forge/init.lua delegating to that module.

Closed by #524 (f410333), which extracted the repo/scope helper layer into lua/forge/repo.lua and left lua/forge/init.lua delegating to that module.
Sign in to join this conversation.
No milestone
No project
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/forge.nvim#518
No description provided.