From 10b175f252104458d7478d8a2822818850cfdf92 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 15 Jan 2023 22:47:30 +0100 Subject: Refactor file structure --- fnl/plugins/editor/harpoon.fnl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 fnl/plugins/editor/harpoon.fnl (limited to 'fnl/plugins/editor/harpoon.fnl') diff --git a/fnl/plugins/editor/harpoon.fnl b/fnl/plugins/editor/harpoon.fnl new file mode 100644 index 0000000..7674f0b --- /dev/null +++ b/fnl/plugins/editor/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 : + (fn [] + (telescope-ext :harpoon :marks + {:theme :get_dropdown + :previewer false + :initial_mode :normal + :prompt_title :Harpoon})) + {}) + (vim.keymap.set :n : + "Telescope buffers theme=dropdown previewer=false initial_mode=normal" + {})) + +{1 :ThePrimeagen/harpoon + :event :BufReadPost + :config (fn [] + (setup))} -- cgit v1.2.3-70-g09d2