summaryrefslogtreecommitdiff
path: root/fnl/util.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-19 23:38:55 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-19 23:38:55 +0200
commite12bf77a9fd8ebe81347532528c084d3a07c366a (patch)
tree9ef0b0c30ef01c7168edd6cb18323a8d3c273430 /fnl/util.fnl
parent3d53862b8c3f1ab19f4ac870079cc62fb886313d (diff)
Add util fun for loading most plugin opts
Diffstat (limited to 'fnl/util.fnl')
-rw-r--r--fnl/util.fnl4
1 files changed, 4 insertions, 0 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
index 0e90396..dd82b23 100644
--- a/fnl/util.fnl
+++ b/fnl/util.fnl
@@ -28,3 +28,7 @@
val-or-err
(vim.notify (.. "Could not load config: " val-or-err)
vim.log.levels.WARN))))
+
+(defn use-config [plugin config]
+ (let [plugin (load-plugin plugin)]
+ (plugin.setup config)))