Skip to content

Commit 28f1511

Browse files
committedDec 22, 2022
fix: show mapleader warning with vim.schedule. Fixes #91
1 parent 2200284 commit 28f1511

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎lua/lazy/manage/reloader.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ function M.check(start)
6565
end
6666

6767
if Loader.init_done and Config.mapleader ~= vim.g.mapleader then
68-
require("lazy.core.util").warn("You need to set `vim.g.mapleader` **BEFORE** loading lazy")
68+
vim.schedule(function()
69+
require("lazy.core.util").warn("You need to set `vim.g.mapleader` **BEFORE** loading lazy")
70+
end)
6971
Config.mapleader = vim.g.mapleader
7072
end
7173

0 commit comments

Comments
 (0)
Please sign in to comment.