File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ M.options = {}
111
111
--- @type string
112
112
M .me = nil
113
113
114
+ --- @type string
115
+ M .mapleader = nil
116
+
114
117
--- @param spec LazySpec
115
118
--- @param opts ? LazyConfig
116
119
function M .setup (spec , opts )
@@ -143,6 +146,7 @@ function M.setup(spec, opts)
143
146
144
147
-- disable plugin loading since we do all of that ourselves
145
148
vim .go .loadplugins = false
149
+ M .mapleader = vim .g .mapleader
146
150
147
151
vim .api .nvim_create_autocmd (" User" , {
148
152
pattern = " VeryLazy" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ local Cache = require("lazy.core.cache")
2
2
local Config = require (" lazy.core.config" )
3
3
local Util = require (" lazy.util" )
4
4
local Plugin = require (" lazy.core.plugin" )
5
+ local Loader = require (" lazy.core.loader" )
5
6
6
7
local M = {}
7
8
@@ -63,6 +64,11 @@ function M.check(start)
63
64
end
64
65
end
65
66
67
+ if Loader .init_done and Config .mapleader ~= vim .g .mapleader then
68
+ require (" lazy.core.util" ).warn (" You need to set `vim.g.mapleader` **BEFORE** loading lazy" )
69
+ Config .mapleader = vim .g .mapleader
70
+ end
71
+
66
72
if not (start or # changes == 0 ) then
67
73
vim .schedule (function ()
68
74
if Config .options .change_detection .notify then
You can’t perform that action at this time.
0 commit comments