From 5679e90f8a687ff1ce33fb2e4f579e4c17ec2d51 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 3 Jan 2023 21:39:21 +0100 Subject: Fix loading of telescope --- fnl/config/util.fnl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fnl/config/util.fnl') diff --git a/fnl/config/util.fnl b/fnl/config/util.fnl index a4dcf5b..7665a57 100644 --- a/fnl/config/util.fnl +++ b/fnl/config/util.fnl @@ -11,3 +11,15 @@ (defn setup [plugin config] (let [plugin (prequire plugin)] (plugin.setup config))) + +(defn telescope-ext [ext fun opts] + (let [telescope (prequire :telescope) + themes (prequire :telescope.themes) + theme (. opts :theme)] + ((. (. (. telescope :extensions) ext) fun) ((. themes theme) opts)))) + +(defn telescope-builtin [builtin opts] + (let [telescope (prequire :telescope.builtin) + themes (prequire :telescope.themes) + theme (. opts :theme)] + ((. telescope builtin) ((. themes theme) opts)))) -- cgit v1.2.3-70-g09d2