From 013596a0f92a64353917a1371c1733a0e4279175 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 10 Jul 2024 00:59:26 +0200 Subject: Update leap config --- fnl/plugins/leap.fnl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fnl/plugins/leap.fnl b/fnl/plugins/leap.fnl index b17df72..58b47e8 100644 --- a/fnl/plugins/leap.fnl +++ b/fnl/plugins/leap.fnl @@ -10,7 +10,7 @@ :event [:BufReadPost :BufNewFile] :opts {;; Additional text objects, to be merged with the default ones. ;; E.g.: {'iq', 'aq'} - :extra_text_objects nil + :extra_text_objects [:iq :aq] ;; Mappings will be generated corresponding to all native text objects, ;; like: (ir|ar|iR|aR|im|am|iM|aM){obj}. ;; Special line objects will also be added, by repeating the affixes. @@ -24,7 +24,7 @@ ;; Defines text objects like `riw`, `raw`, etc., instead of ;; targets.vim-style `irw`, `arw`. (Note: prefix is forced if a custom ;; text object does not start with "a" or "i".) - :prefix false + :prefix true ;; The yanked text will automatically be pasted at the cursor position ;; if the unnamed register is in use. :paste_on_remote_yank false}}]) @@ -32,6 +32,10 @@ (fn config [] (let [leap (require :leap)] (leap.setup {}) - (leap.set_default_keymaps))) + (leap.create_default_mappings) + (vim.keymap.set [:n :x :o] :gs "(leap-from-window)"))) -{1 :ggandor/leap.nvim : dependencies :event [:BufReadPost :BufNewFile] : config} +{1 :ggandor/leap.nvim + : dependencies + :event [:BufReadPost :BufNewFile] + : config} -- cgit v1.2.3-70-g09d2