aboutsummaryrefslogtreecommitdiff
path: root/fnl/nvrc/macro
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc/macro')
-rw-r--r--fnl/nvrc/macro/color.fnl11
1 files changed, 7 insertions, 4 deletions
diff --git a/fnl/nvrc/macro/color.fnl b/fnl/nvrc/macro/color.fnl
index 9636956..d481fc9 100644
--- a/fnl/nvrc/macro/color.fnl
+++ b/fnl/nvrc/macro/color.fnl
@@ -1,9 +1,12 @@
(fn tbl? [x]
(= :table (type x)))
-(fn highlight [group-arg colset]
+(fn highlight! [group colset]
"Add a highlighting group."
- (each [_ group (ipairs (if (tbl? group-arg) group-arg [group-arg]))]
- (vim.api.nvim_set_hl 0 group colset)))
+ `(vim.api.nvim_set_hl 0 ,group ,colset))
-{: highlight}
+(fn link! [group link]
+ "Link a highlighting group."
+ (highlight! group {:link link}))
+
+{: highlight! : link!}