This commit is contained in:
siduck 2023-04-10 10:05:05 +05:30
parent af123eee4d
commit 34bdca17d2
2 changed files with 7 additions and 32 deletions

View File

@ -25,24 +25,9 @@ M.lazy = function(install_path)
-- install plugins -- install plugins
require "plugins" require "plugins"
vim.api.nvim_buf_delete(0, { force = true }) -- close lazy window
---------- mason packages ------------- -- mason packages & show post_boostrap screen
vim.schedule(function() require "nvchad.post_bootstrap"()
vim.cmd "MasonInstallAll"
local packages = table.concat(vim.g.mason_binaries_list, " ")
require("mason-registry"):on("package:install:success", function(pkg)
packages = string.gsub(packages, pkg.name:gsub("%-", "%%-"), "") -- rm package name
if packages:match "%S" == nil then
vim.schedule(function()
vim.api.nvim_buf_delete(0, { force = true })
M.echo "Now please read the docs at nvchad.com!! 󰕹 󰱬"
end)
end
end)
end)
end end
M.gen_chadrc_template = function() M.gen_chadrc_template = function()
@ -60,7 +45,7 @@ M.gen_chadrc_template = function()
vim.fn.mkdir(path, "p") vim.fn.mkdir(path, "p")
local file = io.open(path .. "chadrc.lua", "w") local file = io.open(path .. "chadrc.lua", "w")
file:write "local M = {}\n M.ui = {theme = 'onedark'}\n return M" file:write "---@type ChadrcConfig \n local M = {}\n M.ui = {theme = 'onedark'}\n return M"
file:close() file:close()
end end
end end

View File

@ -1,12 +1,7 @@
-- Chadrc overrides this file
local M = {} local M = {}
M.options = { M.options = {
nvChad = { nvchad_branch = "v2.0",
update_url = "https://github.com/NvChad/NvChad",
update_branch = "v2.0",
},
} }
M.ui = { M.ui = {
@ -29,9 +24,7 @@ M.ui = {
selected_item_bg = "colored", -- colored / simple selected_item_bg = "colored", -- colored / simple
}, },
telescope = { telescope = { style = "borderless" }, -- borderless / bordered
style = "borderless", -- borderless / bordered
},
------------------------------- nvchad_ui modules ----------------------------- ------------------------------- nvchad_ui modules -----------------------------
statusline = { statusline = {
@ -76,9 +69,7 @@ M.ui = {
}, },
}, },
cheatsheet = { cheatsheet = { theme = "grid" }, -- simple/grid
theme = "grid", -- simple/grid
},
lsp = { lsp = {
-- show function signatures i.e args as you type -- show function signatures i.e args as you type
@ -89,11 +80,10 @@ M.ui = {
}, },
} }
M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file
M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options
-- these are default mappings, check core.mappings for table structure
M.mappings = {} M.mappings = {}
return M return M