mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-29 03:44:14 +00:00
feat(loader): warn when maplocalleader is changed after init
This commit is contained in:
parent
aedcd79811
commit
d3d13bc4e0
4 changed files with 13 additions and 0 deletions
|
@ -76,6 +76,13 @@ function M.check(start)
|
|||
Config.mapleader = vim.g.mapleader
|
||||
end
|
||||
|
||||
if Loader.init_done and Config.maplocalleader ~= vim.g.maplocalleader then
|
||||
vim.schedule(function()
|
||||
require("lazy.core.util").warn("You need to set `vim.g.maplocalleader` **BEFORE** loading lazy")
|
||||
end)
|
||||
Config.maplocalleader = vim.g.maplocalleader
|
||||
end
|
||||
|
||||
if not (start or #changes == 0) then
|
||||
vim.schedule(function()
|
||||
if Config.options.change_detection.notify and not Config.headless() then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue