mirror of https://github.com/folke/lazy.nvim.git
config: removed interactive option. not needed
This commit is contained in:
parent
0369278159
commit
47f5c124aa
|
@ -11,7 +11,6 @@ M.defaults = {
|
||||||
---@type string[]
|
---@type string[]
|
||||||
patterns = {},
|
patterns = {},
|
||||||
},
|
},
|
||||||
interactive = true,
|
|
||||||
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
|
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
|
||||||
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
|
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
|
||||||
view = {
|
view = {
|
||||||
|
@ -59,11 +58,6 @@ function M.setup(opts)
|
||||||
M.paths.plugins = vim.fn.stdpath("config") .. "/lua/" .. M.options.plugins:gsub("%.", "/")
|
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")
|
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", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "VeryLazy",
|
pattern = "VeryLazy",
|
||||||
once = true,
|
once = true,
|
||||||
|
|
|
@ -7,7 +7,7 @@ local M = {}
|
||||||
---@class ManagerOpts
|
---@class ManagerOpts
|
||||||
---@field wait? boolean
|
---@field wait? boolean
|
||||||
---@field clear? boolean
|
---@field clear? boolean
|
||||||
---@field interactive? boolean
|
---@field show? boolean
|
||||||
---@field mode? string
|
---@field mode? string
|
||||||
---@field plugins? LazyPlugin[]
|
---@field plugins? LazyPlugin[]
|
||||||
|
|
||||||
|
@ -15,9 +15,6 @@ local M = {}
|
||||||
---@param opts? ManagerOpts
|
---@param opts? ManagerOpts
|
||||||
function M.run(ropts, opts)
|
function M.run(ropts, opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
if opts.interactive == nil then
|
|
||||||
opts.interactive = Config.options.interactive
|
|
||||||
end
|
|
||||||
|
|
||||||
if opts.plugins then
|
if opts.plugins then
|
||||||
ropts.plugins = opts.plugins
|
ropts.plugins = opts.plugins
|
||||||
|
@ -27,7 +24,7 @@ function M.run(ropts, opts)
|
||||||
M.clear()
|
M.clear()
|
||||||
end
|
end
|
||||||
|
|
||||||
if opts.interactive then
|
if opts.show ~= false then
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
require("lazy.view").show(opts.mode)
|
require("lazy.view").show(opts.mode)
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue