summaryrefslogtreecommitdiff
path: root/fnl/config/util.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config/util.fnl')
-rw-r--r--fnl/config/util.fnl12
1 files changed, 12 insertions, 0 deletions
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))))