about summary refs log tree commit diff
path: root/fnl/nvrc/macro/toolkit.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc/macro/toolkit.fnl')
-rw-r--r--fnl/nvrc/macro/toolkit.fnl8
1 files changed, 5 insertions, 3 deletions
diff --git a/fnl/nvrc/macro/toolkit.fnl b/fnl/nvrc/macro/toolkit.fnl
index 8a2bc50..f5671df 100644
--- a/fnl/nvrc/macro/toolkit.fnl
+++ b/fnl/nvrc/macro/toolkit.fnl
@@ -31,9 +31,11 @@
     [prefix object] (gensym-checksum prefix object "")
     [object] (gensym-checksum "" object "")))
 
-(lambda vlua [x]
-  "Return a symbol mapped to `v:lua.%s()`, where `%s` is the symbol."
+(lambda vlua [x ...]
+  "Return a symbol mapped to `v:lua.%s(...)`, where `%s` is the symbol."
   (assert-compile (sym? x) "expected symbol for x" x)
-  (format "v:lua.%s()" (->str x)))
+  (format "v:lua.%s%s"
+          (->str x)
+          (.. "(" (table.concat (icollect [_ v (ipairs [...])] (->str v)) ", ")  ")")))
 
 {: fn? : gensym-checksum : vlua}