rm reference for example_config in bootstrap

This commit is contained in:
siduck 2024-03-10 08:55:15 +05:30 committed by Tim Blume
parent e622153fbd
commit cd2dddfc4b

View file

@ -40,21 +40,13 @@ M.gen_chadrc_template = function()
local path = fn.stdpath "config" .. "/lua/custom" local path = fn.stdpath "config" .. "/lua/custom"
if fn.isdirectory(path) ~= 1 then if fn.isdirectory(path) ~= 1 then
local input = fn.input "Do you want to install example custom config? (y/N): " -- use very minimal chadrc
fn.mkdir(path, "p")
if input:lower() == "y" then local file = io.open(path .. "/chadrc.lua", "w")
M.echo "Cloning example custom config repo..." if file then
shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path } file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M"
fn.delete(path .. "/.git", "rf") file:close()
else
-- use very minimal chadrc
fn.mkdir(path, "p")
local file = io.open(path .. "/chadrc.lua", "w")
if file then
file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M"
file:close()
end
end end
end end
end end