aboutsummaryrefslogtreecommitdiff
path: root/fnl/util.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/util.fnl')
-rw-r--r--fnl/util.fnl7
1 files changed, 7 insertions, 0 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
index c372393..e72dc42 100644
--- a/fnl/util.fnl
+++ b/fnl/util.fnl
@@ -13,4 +13,11 @@
(when (~= req nil)
((. (M.require! name) :setup) (or ?config {})))))
+(tset M :after-setup (lambda [fun]
+ (if (= vim.v.vim_did_enter 1)
+ (fun)
+ (vim.api.nvim_create_autocmd "VimEnter" {
+ :pattern :*
+ :callback fun}))))
+
M