Skip to content

Commit e177dbe

Browse files
authored
Merge pull request #154 from FluxxField/dev
fix: skip extractor loading in infer for non-composable keys
2 parents 5df795f + b9b74f8 commit e177dbe

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lua/smart-motion/core/engine/infer.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,14 @@ function M.run(ctx, cfg, motion_state)
8888
end
8989
end
9090

91-
local modules = module_loader.get_modules(ctx, cfg, motion_state, { "extractor", "action", "visualizer", "filter" })
91+
-- Only request extractor if a composable motion populated it; otherwise the
92+
-- fallback at line 103+ handles non-composable keys (dd, di, da, etc.) and
93+
-- requesting it here would log a spurious "extractor 'default' not found" error.
94+
local infer_keys = { "action", "visualizer", "filter" }
95+
if motion_state.motion.extractor then
96+
table.insert(infer_keys, 1, "extractor")
97+
end
98+
local modules = module_loader.get_modules(ctx, cfg, motion_state, infer_keys)
9299

93100
-- Merge inferred module metadata into motion_state (setup.run merged metadata for the
94101
-- original motion, but infer may have overridden extractor/visualizer/filter/action)

0 commit comments

Comments
 (0)