about summary refs log tree commit diff
path: root/fnl/nvrc/macro/color.fnl
blob: 9636956826a2a8b41cfd61209fe92b1e64cc7ab1 (plain)
1
2
3
4
5
6
7
8
9
(fn tbl? [x]
  (= :table (type x)))

(fn highlight [group-arg colset]
  "Add a highlighting group."
  (each [_ group (ipairs (if (tbl? group-arg) group-arg [group-arg]))]
      (vim.api.nvim_set_hl 0 group colset)))

{: highlight}