[nvim] fix fennel lambda abbreviation
change
commit 11c54ce91d087400f234bafefbb86f8e130cb2a0
author Alpha Chen <alpha@kejadlen.dev>
date
parent 1a85cde0
diff --git a/.config/nvim/fnl/init.fnl b/.config/nvim/fnl/init.fnl
index 7490422d..48e66349 100644
--- a/.config/nvim/fnl/init.fnl
+++ b/.config/nvim/fnl/init.fnl
@@ -201,17 +201,20 @@
 ;; disable animation
 (set vim.g.neovide_cursor_animation_length 0)
 
+;;; plugins
+
 ;;; fidget
 (let [{: setup} (require :fidget)] (setup))
 
 ;; dirvish
-
 (set vim.g.dirvish_mode ":sort ,^.*[\\/],")
 
 ;; indent-blankline
-
 (let [{: setup} (require :ibl)] (setup))
 
+;; mini.align
+(let [{: setup} (require :mini.align)] (setup))
+
 ;;; generate help files
 
 ;; Load all plugins now.
diff --git a/.config/nvim/ftplugin/fennel.fnl b/.config/nvim/ftplugin/fennel.fnl
index 04e14263..6e3024ef 100644
--- a/.config/nvim/ftplugin/fennel.fnl
+++ b/.config/nvim/ftplugin/fennel.fnl
@@ -9,7 +9,7 @@
         ;;       ^ check here (may not exist)
         ;; but dont do anything if that under runs the first character
         offset (- col (length :lambda) 1)]
-    (match [(< 0 offset) (string.sub line offset offset)]
+    (case [(< 0 offset) (string.sub line offset offset)]
       ;; replace term codes so the expr actually runs backspace, not inserts the string
       [true :\] (vim.api.nvim_replace_termcodes :<bs>λ true false true)
-      [false _] :lambda)))
+      [_ _] :lambda)))