summaryrefslogtreecommitdiff
path: root/fnl/plugins/harpoon.fnl
blob: 7674f0b4e411b2b45bba1c1f886c64375bd70ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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))}