From 47f5c124aafae70b11db7ebef502c96c80aaf845 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 30 Nov 2022 23:07:09 +0100 Subject: [PATCH] config: removed interactive option. not needed --- lua/lazy/core/config.lua | 6 ------ lua/lazy/manage/init.lua | 7 ++----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 802695e..39c562e 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -11,7 +11,6 @@ M.defaults = { ---@type string[] patterns = {}, }, - interactive = true, packpath = vim.fn.stdpath("data") .. "/site/pack/lazy", lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", view = { @@ -59,11 +58,6 @@ function M.setup(opts) M.paths.plugins = vim.fn.stdpath("config") .. "/lua/" .. M.options.plugins:gsub("%.", "/") M.paths.main = M.paths.plugins .. (vim.loop.fs_stat(M.paths.plugins .. ".lua") and ".lua" or "/init.lua") - -- TODO: check what this does inside a GUI. Probably still ok - if #vim.api.nvim_list_uis() == 0 then - M.options.interactive = false - end - vim.api.nvim_create_autocmd("User", { pattern = "VeryLazy", once = true, diff --git a/lua/lazy/manage/init.lua b/lua/lazy/manage/init.lua index dd2f267..fea68f2 100644 --- a/lua/lazy/manage/init.lua +++ b/lua/lazy/manage/init.lua @@ -7,7 +7,7 @@ local M = {} ---@class ManagerOpts ---@field wait? boolean ---@field clear? boolean ----@field interactive? boolean +---@field show? boolean ---@field mode? string ---@field plugins? LazyPlugin[] @@ -15,9 +15,6 @@ local M = {} ---@param opts? ManagerOpts function M.run(ropts, opts) opts = opts or {} - if opts.interactive == nil then - opts.interactive = Config.options.interactive - end if opts.plugins then ropts.plugins = opts.plugins @@ -27,7 +24,7 @@ function M.run(ropts, opts) M.clear() end - if opts.interactive then + if opts.show ~= false then vim.schedule(function() require("lazy.view").show(opts.mode) end)