Skip to content
Munif Tanjim edited this page Jan 5, 2022 · 1 revision

Make winhighlight string from a table

local function make_winhighlight(highlight)
  return table.concat(
    vim.tbl_map(function(key)
      return key .. ":" .. highlight[key]
    end, vim.tbl_keys(highlight)),
    ","
  )
end

local winhighlight = make_winhighlight({
  Normal = "Normal",
  FloatBorder = "SpecialChar"
}) -- Normal:Normal,FloatBorder:SpecialChar
Clone this wiki locally