summaryrefslogtreecommitdiff
path: root/fnl/config/util.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-03 21:39:21 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-03 21:39:21 +0100
commit5679e90f8a687ff1ce33fb2e4f579e4c17ec2d51 (patch)
tree7caa0db34e47c46d1351f47af8b92d54f92cdab1 /fnl/config/util.fnl
parentc4ace08e2413a5750141c0ef189a9b716746876e (diff)
Fix loading of telescope
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))))