diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-03 23:07:34 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-03 23:07:34 +0200 |
| commit | 3b1447358ce9ddddd454e080003c94c494320e6d (patch) | |
| tree | 9f7d906d63ca9ab7392015148e112b341e515ebf /lua/clever_f/domain.lua | |
| parent | 4ace71b059d8db228e05363cfee77586f52df136 (diff) | |
Implement Migemo target matching
Diffstat (limited to 'lua/clever_f/domain.lua')
| -rw-r--r-- | lua/clever_f/domain.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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(), |
