From 11d50dc8934a5b9e9be73d0445789e005843dfc2 Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Sat, 18 Apr 2026 00:52:28 +0200 Subject: more based changes --- fnl/plugins/snippets.fnl | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'fnl/plugins/snippets.fnl') diff --git a/fnl/plugins/snippets.fnl b/fnl/plugins/snippets.fnl index 70917ba..6dd317e 100644 --- a/fnl/plugins/snippets.fnl +++ b/fnl/plugins/snippets.fnl @@ -1,4 +1,5 @@ ;; Snippets functionality. +(import-macros {: keymaps} :macros) (local dependencies [:rafamadriz/friendly-snippets]) @@ -16,19 +17,23 @@ (add-snippets (fname:match "^(.*)%.fnl$")))) (ls.config.set_config {:history true :updateevents "TextChanged,TextChangedI"}) - (vim.keymap.set [:i :s] : - (λ [] - (when (ls.expand_or_jumpable) - (ls.expand_or_jump))) {:silent true}) - (vim.keymap.set [:i :s] : - (λ [] - (when (ls.jumpable -1) - (ls.jump -1)) - {:silent true})) - (vim.keymap.set [:i] : - (λ [] - (when (ls.choice_active) - (ls.change_choice 1))) - {:silent true}))) + (keymaps [[:i :s] + : + (λ [] + (when (ls.expand_or_jumpable) + (ls.expand_or_jump))) + {:silent true}] + [[:i :s] + : + (λ [] + (when (ls.jumpable -1) + (ls.jump -1))) + {:silent true}] + [[:i] + : + (λ [] + (when (ls.choice_active) + (ls.change_choice 1))) + {:silent true}]))) {1 :L3MON4D3/LuaSnip :event :InsertEnter : config : dependencies} -- cgit v1.2.3-70-g09d2