From 3b1447358ce9ddddd454e080003c94c494320e6d Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Thu, 3 Sep 2026 23:07:34 +0200 Subject: Implement Migemo target matching --- lua/clever_f/domain.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lua/clever_f/domain.lua') diff --git a/lua/clever_f/domain.lua b/lua/clever_f/domain.lua index a5b8d39..6a40092 100644 --- a/lua/clever_f/domain.lua +++ b/lua/clever_f/domain.lua @@ -987,6 +987,14 @@ function TargetPlan:matches(...) return self.matcher(...) end +function TargetPlan:matches_at(text_view, position) + if type(text_view) ~= "table" or type(text_view.character_at) ~= "function" then + fail("target plan match requires a text view", 2) + end + position = Position.coerce(position) + return self.matcher(text_view:character_at(position), position, text_view) +end + function TargetPlan:to_table() return { target = self.target:to_table(), -- cgit v1.2.3