From 44ef2dace2a9d8f83824d79c12fc13589c8ff63d Mon Sep 17 00:00:00 2001 From: Ramojus Lapinskas Date: Thu, 20 Jun 2024 18:31:26 +0300 Subject: [PATCH] fix: allow highlights without style The issue shouldn't be possible, but there seems to be some optimization going on that sometimes removes empty tables. --- lua/mellifluous/utils/highlighter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/mellifluous/utils/highlighter.lua b/lua/mellifluous/utils/highlighter.lua index 7eb2524..1ed8492 100644 --- a/lua/mellifluous/utils/highlighter.lua +++ b/lua/mellifluous/utils/highlighter.lua @@ -28,7 +28,7 @@ end function M.apply_all() for name, attributes in pairs(highlights) do - for style_name, val in pairs(attributes.style) do + for style_name, val in pairs(attributes.style or {}) do attributes[style_name] = val end attributes.style = nil