diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-15 22:47:30 +0100 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-15 22:47:30 +0100 |
| commit | 10b175f252104458d7478d8a2822818850cfdf92 (patch) | |
| tree | ee926d33bee6b4acfe45fce0dd8aa9e94f03f06a /fnl/plugins/editor/harpoon.fnl | |
| parent | 9d4f654187869f96e27ab54a88708aba5959f1ba (diff) | |
Refactor file structure
Diffstat (limited to 'fnl/plugins/editor/harpoon.fnl')
| -rw-r--r-- | fnl/plugins/editor/harpoon.fnl | 25 |
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))} |