diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-01-05 01:50:20 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-01-05 01:50:20 +0100 |
commit | 2a94573f54c69a9af7536586ab2c03eb88bda5e7 (patch) | |
tree | 48e430773d56baef8c751fb8a6b4d76303b61636 /fnl/plugins/leap.fnl | |
parent | 16198ca3bcd0ddd61f8d18280769c6f226b2b7ce (diff) |
Refactor
Diffstat (limited to 'fnl/plugins/leap.fnl')
-rw-r--r-- | fnl/plugins/leap.fnl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/fnl/plugins/leap.fnl b/fnl/plugins/leap.fnl new file mode 100644 index 0000000..c5b700d --- /dev/null +++ b/fnl/plugins/leap.fnl @@ -0,0 +1,37 @@ +;; Leap through text. + +(local dependencies [{1 :ggandor/flit.nvim + :event :BufReadPost + :opts {:keys {:f :f :F :F :t :t :T :T} + :labeled_modes :v + :multiline true + :opts {}}} + {1 :ggandor/leap-spooky.nvim + :event :BufReadPost + :opts {;; Additional text objects, to be merged with the default ones. + ;; E.g.: {'iq', 'aq'} + :extra_text_objects nil + ;; 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. + ;; E.g. `yrr<leap>` and `ymm<leap>` will yank a line in the current + ;; window. + :affixes {;; The cursor moves to the targeted object, and stays there. + :magnetic {:window :m :cross_window :M} + ;; The operation is executed seemingly remotely (the cursor boomerangs + ;; back afterwards). + :remote {:window :r :cross_window :R}} + ;; 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 + ;; The yanked text will automatically be pasted at the cursor position + ;; if the unnamed register is in use. + :paste_on_remote_yank false}}]) + +(fn config [] + (let [leap (require :leap)] + (leap.setup {}) + (leap.set_default_keymaps))) + +{1 :ggandor/leap.nvim : dependencies :event :BufReadPost : config} |