diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index c8adc036..6a457cf1 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -21,23 +21,8 @@ local Config = require("lazy.core.config") local Plugin = require("lazy.core.plugin") Config.options.checker.enabled = false Config.options.change_detection.enabled = false - --- HACK: disable all plugins except the ones we want -local fix_disabled = Plugin.Spec.fix_disabled -function Plugin.Spec.fix_disabled(self) - for _, plugin in pairs(self.plugins) do - if not (vim.tbl_contains(enabled, plugin.name) or plugin.vscode) then - plugin.enabled = false - end - end - fix_disabled(self) -end - --- HACK: don't clean plugins in vscode -local update_state = Plugin.update_state -function Plugin.update_state() - update_state() - Config.to_clean = {} +Config.options.defaults.cond = function(plugin) + return vim.tbl_contains(enabled, plugin.name) or plugin.vscode end -- Add some vscode specific keymaps