summaryrefslogtreecommitdiff
path: root/fnl/plugins/editor/harpoon.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/editor/harpoon.fnl')
-rw-r--r--fnl/plugins/editor/harpoon.fnl25
1 files changed, 25 insertions, 0 deletions
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 :<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))}