summaryrefslogtreecommitdiff
path: root/fnl/plugins/snippets.fnl
diff options
context:
space:
mode:
authoraktersnurra <gustaf@gustafrydholm.xyz>2026-04-18 00:52:28 +0200
committeraktersnurra <gustaf@gustafrydholm.xyz>2026-04-20 22:58:39 +0200
commit11d50dc8934a5b9e9be73d0445789e005843dfc2 (patch)
treec87c84806ab5fcd48f191c765650b91e1e52ce6f /fnl/plugins/snippets.fnl
parent0f3690bd084ba3b47b4c356089b03a6df763572c (diff)
more based changesHEADmaster
Diffstat (limited to 'fnl/plugins/snippets.fnl')
-rw-r--r--fnl/plugins/snippets.fnl33
1 files changed, 19 insertions, 14 deletions
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] :<c-u>
- (λ []
- (when (ls.expand_or_jumpable)
- (ls.expand_or_jump))) {:silent true})
- (vim.keymap.set [:i :s] :<c-l>
- (λ []
- (when (ls.jumpable -1)
- (ls.jump -1))
- {:silent true}))
- (vim.keymap.set [:i] :<c-j>
- (λ []
- (when (ls.choice_active)
- (ls.change_choice 1)))
- {:silent true})))
+ (keymaps [[:i :s]
+ :<c-u>
+ (λ []
+ (when (ls.expand_or_jumpable)
+ (ls.expand_or_jump)))
+ {:silent true}]
+ [[:i :s]
+ :<c-l>
+ (λ []
+ (when (ls.jumpable -1)
+ (ls.jump -1)))
+ {:silent true}]
+ [[:i]
+ :<c-j>
+ (λ []
+ (when (ls.choice_active)
+ (ls.change_choice 1)))
+ {:silent true}])))
{1 :L3MON4D3/LuaSnip :event :InsertEnter : config : dependencies}