Skip to content

Commit 8112640

Browse files
committed
feat!: init() no longer implies lazy-loading. Add lazy=false for affected plugins
1 parent 6f9845e commit 8112640

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Plugins will be lazy-loaded when one of the following is `true`:
125125

126126
- the plugin only exists as a dependency in your spec
127127
- it has an `event`, `cmd`, `ft` or `keys` key
128-
- it defines an `init` method
129128
- `config.defaults.lazy == true`
130129

131130
#### ⌨️ Lazy Key Mappings
@@ -244,7 +243,6 @@ return {
244243
{
245244
"cshuaimin/ssr.nvim",
246245
-- init is always executed during startup, but doesn't load the plugin yet.
247-
-- init implies lazy loading
248246
init = function()
249247
vim.keymap.set({ "n", "x" }, "<leader>cR", function()
250248
-- this require will automatically load the plugin

lua/lazy/core/plugin.lua

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ function M.update_state()
201201
or plugin.keys
202202
or plugin.ft
203203
or plugin.cmd
204-
or plugin.init
205204
plugin.lazy = lazy and true or false
206205
end
207206
if plugin.dir:find(Config.options.root, 1, true) == 1 then

0 commit comments

Comments
 (0)