include downloading of lazy-lock.json while bootstrapping

also pin all plugins by default
This commit is contained in:
siduck 2023-01-08 07:40:00 +05:30
parent 4378cb9532
commit 7cd80a35c6
3 changed files with 17 additions and 4 deletions

View File

@ -1,6 +1,14 @@
local M = {} local M = {}
M.lazy = function(install_path) M.lazy = function(install_path)
print "Downloading lazy-lock.json file..."
local config_branch = require("core.utils").load_config().options.nvChad.update_branch
vim.cmd(
"!curl -o lazy-lock.json https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json "
)
print "Bootstrapping lazy.nvim .." print "Bootstrapping lazy.nvim .."
vim.fn.system { vim.fn.system {

View File

@ -5,7 +5,7 @@ local M = {}
M.options = { M.options = {
nvChad = { nvChad = {
update_url = "https://github.com/NvChad/NvChad", update_url = "https://github.com/NvChad/NvChad",
update_branch = "lazy", update_branch = "v2.0",
}, },
} }

View File

@ -4,14 +4,14 @@ local plugins = {
["nvim-lua/plenary.nvim"] = {}, ["nvim-lua/plenary.nvim"] = {},
["NvChad/extensions"] = { branch = "lazy" }, ["NvChad/extensions"] = { branch = "v2.0" },
["NvChad/base46"] = { ["NvChad/base46"] = {
branch = "lazy", branch = "v2.0",
}, },
["NvChad/ui"] = { ["NvChad/ui"] = {
branch = "lazy", branch = "v2.0",
lazy = false, lazy = false,
config = function() config = function()
require "nvchad_ui" require "nvchad_ui"
@ -183,6 +183,11 @@ local plugins = {
}, },
} }
-- pin commits for all default plugins
for _, value in pairs(plugins) do
value.pin = true
end
plugins = require("core.utils").merge_plugins(plugins) plugins = require("core.utils").merge_plugins(plugins)
-- load lazy.nvim options -- load lazy.nvim options