summaryrefslogtreecommitdiff
path: root/fnl/plugins/harpoon.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/harpoon.fnl')
-rw-r--r--fnl/plugins/harpoon.fnl24
1 files changed, 4 insertions, 20 deletions
diff --git a/fnl/plugins/harpoon.fnl b/fnl/plugins/harpoon.fnl
index 938095d..9ff2fbc 100644
--- a/fnl/plugins/harpoon.fnl
+++ b/fnl/plugins/harpoon.fnl
@@ -1,5 +1,7 @@
;; Harpoon files for navigation.
+(local opts {:ui_max_width 64 :title " ⇁ "})
+
(local user-cmds [[:HarpoonAdd
(lambda []
(let [harpoon (require :harpoon)]
@@ -8,15 +10,9 @@
[:HarpoonUI
(lambda []
(let [harpoon (require :harpoon)]
- (harpoon.ui:toggle_quick_menu (harpoon:list))))
+ (harpoon.ui:toggle_quick_menu (harpoon:list) opts)))
{:nargs 0}]])
-(fn telescope-ext [ext fun opts]
- (let [telescope (require :telescope)
- themes (require :telescope.themes)
- theme (. opts :theme)]
- ((. (. (. telescope :extensions) ext) fun) ((. themes theme) opts))))
-
(lambda select [nr]
(let [harpoon (require :harpoon)]
(: (harpoon:list) :select nr)))
@@ -25,17 +21,6 @@
(let [cmds (require :util.cmds)]
(cmds.create-user-cmds user-cmds)))
-(fn config []
- (vim.keymap.set :n :<tab>
- (fn []
- (telescope-ext :harpoon :marks
- {:theme :get_dropdown
- :previewer false
- :initial_mode :normal
- :prompt_title :Harpoon}))
- {})
- {:menu {:width (- (vim.api.nvim_win_get_width 0) 4)}})
-
(local keys [{1 :ma 2 :<cmd>HarpoonAdd<cr> :desc :Harpoon}
{1 :mr 2 :<cmd>HarpoonUI<cr> :desc "Harpoon UI"}
{1 :ms
@@ -59,5 +44,4 @@
:branch :harpoon2
:event :BufReadPost
: init
- : keys
- : config}
+ : keys}