diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-02-14 14:18:14 +0100 | 
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-02-14 14:18:14 +0100 | 
| commit | 3286ea5e4bee423b11aa163785a1736009b345e5 (patch) | |
| tree | 8ca25b98bec733e178878305eb9cc05f453d07a6 /fnl | |
| parent | e0415870d8d2eb6e9178440ebed3caf4117094b4 (diff) | |
Update ui options in harpoon and change buffer keymap
Diffstat (limited to 'fnl')
| -rw-r--r-- | fnl/plugins/harpoon.fnl | 24 | ||||
| -rw-r--r-- | fnl/plugins/telescope.fnl | 4 | 
2 files changed, 6 insertions, 22 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} diff --git a/fnl/plugins/telescope.fnl b/fnl/plugins/telescope.fnl index 938bedd..2410583 100644 --- a/fnl/plugins/telescope.fnl +++ b/fnl/plugins/telescope.fnl @@ -55,8 +55,8 @@               {1 :mg                2 "<cmd>Telescope live_grep theme=dropdown<cr>"                :desc "Find Text"} -             {1 :<s-tab> -              2 "<cmd>Telescope buffers theme=dropdown previewer=false initial_mode=normal<cr>" +             {1 :<tab> +              2 "<cmd>Telescope buffers theme=dropdown previewer=true initial_mode=normal<cr>"                :desc "Switch Buffer"}               {1 :<leader>fC                2 "<cmd>Telescope commands theme=dropdown<cr>"  |