fix: show mapleader warning with vim.schedule. Fixes #91

This commit is contained in:
Folke Lemaitre 2022-12-22 09:12:06 +01:00
parent 2200284165
commit 28f1511e0a
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 1 deletions

View File

@ -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