mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
feat(loader): warn when maplocalleader is changed after init (#1326)
* feat(loader): warn when maplocalleader is changed after init * docs: default maplocalleader --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
parent
c96fc24555
commit
0694651fd3
4 changed files with 14 additions and 1 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