diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-11 00:41:17 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-11 00:41:17 +0100 |
commit | f318452070d42e51231f7880a5d0eaa93d978a1e (patch) | |
tree | c76f35889ebc7a4e52bbd06e07c8f33f9bf68f5d /fnl/plugins/harpoon.fnl | |
parent | 433952cf3efa8e2b5e23ff0e76a4afe6f95d44b5 (diff) |
Rip aniseed, hail hotpot
Diffstat (limited to 'fnl/plugins/harpoon.fnl')
-rw-r--r-- | fnl/plugins/harpoon.fnl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fnl/plugins/harpoon.fnl b/fnl/plugins/harpoon.fnl new file mode 100644 index 0000000..7674f0b --- /dev/null +++ b/fnl/plugins/harpoon.fnl @@ -0,0 +1,25 @@ +;; Harpoon files for navigation. + +(fn telescope-ext [ext fun opts] + (let [telescope (require :telescope) + themes (require :telescope.themes) + theme (. opts :theme)] + ((. (. (. telescope :extensions) ext) fun) ((. themes theme) opts)))) + +(fn setup [] + (vim.keymap.set :n :<tab> + (fn [] + (telescope-ext :harpoon :marks + {:theme :get_dropdown + :previewer false + :initial_mode :normal + :prompt_title :Harpoon})) + {}) + (vim.keymap.set :n :<s-tab> + "<cmd>Telescope buffers theme=dropdown previewer=false initial_mode=normal<cr>" + {})) + +{1 :ThePrimeagen/harpoon + :event :BufReadPost + :config (fn [] + (setup))} |