diff --git a/lua/lazyvim/plugins/extras/coding/mini-surround.lua b/lua/lazyvim/plugins/extras/coding/mini-surround.lua index 56d16a60..d8ff25c5 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-surround.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-surround.lua @@ -4,7 +4,6 @@ -- and more. return { "echasnovski/mini.surround", - recommended = true, keys = function(_, keys) -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index aa26f6e1..c1dd76fd 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -40,7 +40,6 @@ end return { desc = "Awesome picker for FZF (alternative to Telescope)", - recommended = true, { "ibhagwan/fzf-lua", cmd = "FzfLua", diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index 3e91f3ea..4163c799 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -1,24 +1,24 @@ return { - { - "folke/snacks.nvim", - opts = { explorer = {} }, - keys = { - { - "fe", - function() - Snacks.explorer({ cwd = LazyVim.root() }) - end, - desc = "Explorer Snacks (root dir)", - }, - { - "fE", - function() - Snacks.explorer() - end, - desc = "Explorer Snacks (cwd)", - }, - { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, - { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, + desc = "Snacks File Explorer", + recommended = true, + "folke/snacks.nvim", + opts = { explorer = {} }, + keys = { + { + "fe", + function() + Snacks.explorer({ cwd = LazyVim.root() }) + end, + desc = "Explorer Snacks (root dir)", }, + { + "fE", + function() + Snacks.explorer() + end, + desc = "Explorer Snacks (cwd)", + }, + { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, + { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, }, } diff --git a/lua/lazyvim/util/extras.lua b/lua/lazyvim/util/extras.lua index fa87e820..6bc8eca2 100644 --- a/lua/lazyvim/util/extras.lua +++ b/lua/lazyvim/util/extras.lua @@ -83,6 +83,7 @@ end ---@param modname string ---@param source LazyExtraSource function M.get_extra(source, modname) + LazyVim.plugin.handle_defaults = false local enabled = vim.tbl_contains(M.state, modname) local spec = Plugin.Spec.new(nil, { optional = true, pkg = false }) spec:parse({ import = modname }) diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index c20a0fc8..e6cae997 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -5,6 +5,7 @@ local M = {} ---@type string[] M.core_imports = {} +M.handle_defaults = true M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" } @@ -81,7 +82,7 @@ end function M.fix_imports() local defaults ---@type table Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec) - if LazyVim.config.json.loaded then + if M.handle_defaults and LazyVim.config.json.loaded then -- extra disabled by defaults? defaults = defaults or LazyVim.config.get_defaults() local def = defaults[spec.import]