Skip to content

Commit

Permalink
feat!: init() no longer implies lazy-loading. Add lazy=false for …
Browse files Browse the repository at this point in the history
…affected plugins
  • Loading branch information
folke committed Dec 22, 2022
1 parent 6f9845e commit 8112640
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ Plugins will be lazy-loaded when one of the following is `true`:

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

#### ⌨️ Lazy Key Mappings
Expand Down Expand Up @@ -244,7 +243,6 @@ return {
{
"cshuaimin/ssr.nvim",
-- init is always executed during startup, but doesn't load the plugin yet.
-- init implies lazy loading
init = function()
vim.keymap.set({ "n", "x" }, "<leader>cR", function()
-- this require will automatically load the plugin
Expand Down
1 change: 0 additions & 1 deletion lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ function M.update_state()
or plugin.keys
or plugin.ft
or plugin.cmd
or plugin.init
plugin.lazy = lazy and true or false
end
if plugin.dir:find(Config.options.root, 1, true) == 1 then
Expand Down

0 comments on commit 8112640

Please sign in to comment.