From 991091228f9e403015edd0106ccfc3a0ce62e304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Vulquin?= Date: Wed, 24 Jul 2024 22:10:02 +0200 Subject: nvim: continue fennel porting Yeah I'm lazy but these are my dotfiles. A quick summary: * plugins.lsp.attach is now ported * toast.core is reorganized * new nil? and number? checks * new assoc function * new toast.table.unpack function (cross lua compat) * toast.macros.tbl now uses assoc instead of from-pairs and group * apparently I had forgotten to add {pre,post,init}.fnl before, so that's done now Still todo: ftplugin, colors. --- dot_config/nvim/fnl/toast/macros.fnl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dot_config/nvim/fnl/toast/macros.fnl') diff --git a/dot_config/nvim/fnl/toast/macros.fnl b/dot_config/nvim/fnl/toast/macros.fnl index bb4375b..b81d8e6 100644 --- a/dot_config/nvim/fnl/toast/macros.fnl +++ b/dot_config/nvim/fnl/toast/macros.fnl @@ -2,9 +2,8 @@ (local {: inc : drop - : group} (require :toast.core)) -(local {: from-pairs - : insert} (require :toast.table)) + : assoc} (require :toast.core)) +(local {: insert} (require :toast.table)) (fn tbl [...] "Generate a mixed table. @@ -16,7 +15,7 @@ &until (= v '&)] (insert out v)) post (drop (inc (length pre)) args)] - (from-pairs (group 2 post) pre))) + (assoc pre (unpack post)))) (fn recc [reqspec key ...] "A common lua pattern is `require 'something'.call(arg1, arg2)`. -- cgit v1.2.3