Skip to content

Commit

Permalink
fix: show mapleader warning with vim.schedule. Fixes #91
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 22, 2022
1 parent 2200284 commit 28f1511
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazy/manage/reloader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ function M.check(start)
end

if Loader.init_done and Config.mapleader ~= vim.g.mapleader then
require("lazy.core.util").warn("You need to set `vim.g.mapleader` **BEFORE** loading lazy")
vim.schedule(function()
require("lazy.core.util").warn("You need to set `vim.g.mapleader` **BEFORE** loading lazy")
end)
Config.mapleader = vim.g.mapleader
end

Expand Down

0 comments on commit 28f1511

Please sign in to comment.