irongit

Configure synchronization of files and directories through a plugin.

lazy loading everything now

huncholanehuncholaneauthored
parent 68c997acommit f3551eb57f3057f20f3025188134e3a76f54d759Browse files

2 files changed, +7 -2

+4-1lua/syncmap/init.lua
@@ -18,7 +18,10 @@ function M.setup(opts)
1818 M.log.opts = M.opts
1919 M.commands.opts = M.opts
2020 M.commands.setup()
21- M.state.sync()
21+ vim.api.nvim_create_autocmd("User", {
22+ pattern = "VeryLazy",
23+ callback = M.state.sync,
24+ })
2225 end
2326
2427 return M
+3-1lua/syncmap/log.lua
@@ -19,7 +19,9 @@ M.log_table = {
1919 ---@param level vim.log.levels
2020 function M.log(msg, level)
2121 if level >= M.log_table[M.opts.log_level] then
22- vim.notify("[syncmap] " .. msg, level)
22+ vim.schedule(function()
23+ vim.notify("[syncmap] " .. msg, level)
24+ end)
2325 end
2426 end
2527