From b5000aed439b0002e10074d1605a593441f176df Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 31 Dec 2022 00:43:33 +0100 Subject: Move telescope plugins to telescope config --- fnl/config/auto-session.fnl | 8 +------- fnl/config/harpoon.fnl | 2 -- fnl/config/telescope.fnl | 9 ++++++++- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'fnl/config') diff --git a/fnl/config/auto-session.fnl b/fnl/config/auto-session.fnl index 2e236b2..97834f7 100644 --- a/fnl/config/auto-session.fnl +++ b/fnl/config/auto-session.fnl @@ -11,13 +11,7 @@ :auto_session_use_git_branch nil :bypass_session_save_file_types [:alpha]}) -(def- lens-opts {:path_display [:shorten] - :previewer false - :prompt_title :Sessions}) - (set vim.o.sessionoptions "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal") -(util.setup :session-lens lens-opts) + (util.setup :auto-session auto-opts) -(let [telescope (require :telescope)] - (telescope.load_extension :session-lens)) diff --git a/fnl/config/harpoon.fnl b/fnl/config/harpoon.fnl index 21f1b27..9905439 100644 --- a/fnl/config/harpoon.fnl +++ b/fnl/config/harpoon.fnl @@ -4,8 +4,6 @@ (def- opts {}) (util.setup :harpoon opts) -(let [telescope (require :telescope)] - (telescope.load_extension :harpoon)) (nvim.set_keymap :n : "lua require('telescope').extensions.harpoon.marks(require('telescope.themes').get_dropdown{previewer = false, initial_mode='normal', prompt_title='Harpoon'})" diff --git a/fnl/config/telescope.fnl b/fnl/config/telescope.fnl index ef125bb..c04c4a5 100644 --- a/fnl/config/telescope.fnl +++ b/fnl/config/telescope.fnl @@ -3,6 +3,10 @@ (def- opts {:noremap true :silent true}) +(def- lens-opts {:path_display [:shorten] + :previewer false + :prompt_title :Sessions}) + (let [telescope (util.prequire :telescope)] (let [actions (require :telescope.actions)] (telescope.setup {:defaults {:prompt_prefix "  " @@ -77,4 +81,7 @@ :case_mode :smart_case}}}) (telescope.load_extension :fzf) (telescope.load_extension :frecency) - (telescope.load_extension :orgmode))) + (telescope.load_extension :orgmode) + (telescope.load_extension :harpoon) + (util.setup :session-lens lens-opts) + (telescope.load_extension :session-lens))) -- cgit v1.2.3-70-g09d2