boostrap mason packages properly

print some message when nvchad is totally setup
This commit is contained in:
siduck
2023-03-24 04:35:54 +05:30
parent 84bdc2335c
commit 7ec4515179
4 changed files with 31 additions and 21 deletions

View File

@@ -73,18 +73,17 @@ autocmd("FileType", {
-- reload some chadrc options on-save
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = vim.tbl_map(vim.fs.normalize, vim.fn.glob(
vim.fn.stdpath("config") .. "/lua/custom/**/*.lua",
true,
true,
true
)),
pattern = vim.tbl_map(
vim.fs.normalize,
vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)
),
group = vim.api.nvim_create_augroup("ReloadNvChad", {}),
callback = function(opts)
local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]]
local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim"
local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".")
require("plenary.reload").reload_module "base46"
require("plenary.reload").reload_module(module)
require("plenary.reload").reload_module "custom.chadrc"