Repository navigation
fix(mcphub-nvim): disable make_vars to prevent codecompanion load order error - #1787
syltharion wants to merge 1 commit into
Conversation
…er error Closes AstroNvim#1777 When mcphub loads before codecompanion is fully initialized, the make_vars option triggers variable registration that fails with 'bad argument AstroNvim#1 to pairs (table expected, got nil)' because codecompanion's variable registry is not yet available. Disable make_vars by default to prevent the crash. Users who need MCP variables in codecompanion can re-enable this after ensuring mcphub loads after codecompanion.
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
Summary
Sets
make_vars = falsein the mcphub codecompanion extension config to prevent a load order crash.Problem
When mcphub loads before codecompanion is fully initialized, the
make_vars = trueoption triggers variable registration in avim.schedulecallback. At that point, codecompanion's variable registry table is still nil, causing:Fix
Disable
make_varsby default. This prevents the crash while keepingmake_slash_commandsandshow_result_in_chatenabled. Users who need MCP variables in codecompanion can re-enable this in their own config after ensuring proper load order.Closes #1777