feat(loader): warn when mapleader is changed after init

This commit is contained in:
Folke Lemaitre 2022-12-21 10:51:31 +01:00
parent 540847b7cb
commit 4ca30390ec
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 10 additions and 0 deletions

View file

@ -111,6 +111,9 @@ M.options = {}
---@type string
M.me = nil
---@type string
M.mapleader = nil
---@param spec LazySpec
---@param opts? LazyConfig
function M.setup(spec, opts)
@ -143,6 +146,7 @@ function M.setup(spec, opts)
-- disable plugin loading since we do all of that ourselves
vim.go.loadplugins = false
M.mapleader = vim.g.mapleader
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",