diff options
Diffstat (limited to 'lua/clever_f/feedback_service.lua')
| -rw-r--r-- | lua/clever_f/feedback_service.lua | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lua/clever_f/feedback_service.lua b/lua/clever_f/feedback_service.lua index f7e1dd6..d1fa9d6 100644 --- a/lua/clever_f/feedback_service.lua +++ b/lua/clever_f/feedback_service.lua @@ -52,7 +52,10 @@ local function normalize_options(options) end local function require_host(host) - if type(host) ~= "table" or type(host.read_highlight_group) ~= "function" then + if type(host) ~= "table" + or type(host.read_highlight_group) ~= "function" + or type(host.define_highlight_group) ~= "function" + then fail("FeedbackService host must provide highlight groups", 3) end return host @@ -86,7 +89,19 @@ function FeedbackService:ensure_default_label() applied = false, } end - return nil + + local definition = M.default_label_definition() + service_records[self].host:define_highlight_group( + M.DEFAULT_LABEL_GROUP, + definition, + { default = true } + ) + return { + group = M.DEFAULT_LABEL_GROUP, + definition = definition, + source = "fallback", + applied = true, + } end function M.new(options) |
