diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 14:17:17 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 14:17:17 +0200 |
| commit | 2fb7acaea6252f2eb63427fd1e69645d319144c2 (patch) | |
| tree | c5638656672cc35ce9a17b510b0af1babb073100 | |
| parent | 401a2851c643c5051c75310704cfdc94d6b0a072 (diff) | |
Evaluate activation highlights
| -rw-r--r-- | lua/clever_f/composition_root.lua | 1 | ||||
| -rw-r--r-- | tests/run.lua | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/lua/clever_f/composition_root.lua b/lua/clever_f/composition_root.lua index e04c177..8d75359 100644 --- a/lua/clever_f/composition_root.lua +++ b/lua/clever_f/composition_root.lua @@ -84,6 +84,7 @@ function CompositionRoot:activate() if record.activation == nil then record.activation = { state = record.state, + highlights = record.feedback:evaluate_highlights(), } end return record.activation diff --git a/tests/run.lua b/tests/run.lua index 8520d5a..f9e46f2 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7086,6 +7086,25 @@ test("Core activation owns the plugin-global sequence state", function() same(activation, root:activate()) end) +test("Core activation evaluates default and enabled feature highlights", function() + fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + mark_cursor = true, + mark_char = false, + mark_direct = true, + }, + }) + local activation = composition_root.new({ host = host }):activate() + local groups = host:highlight_groups() + + same("fallback", activation.highlights.default_label.source) + same("red", groups.CleverFDefaultLabel.guifg) + same("Cursor", groups.CleverFCursor.link) + same(nil, groups.CleverFChar) + same("CleverFDefaultLabel", groups.CleverFDirect.link) +end) + test("Primary coordination accepts only the four motion descriptors", function() local coordinator = sequence_coordinator.new({ host = MemoryHost.new() }) for _, value in ipairs({ "f", "F", "t", "T" }) do |
