finally, peace

This commit is contained in:
Christoph J. Scherr 2024-05-28 23:07:01 +02:00
parent 6b75d25bf0
commit 430d9ff9d6
2 changed files with 0 additions and 63 deletions

View File

@ -71,42 +71,6 @@ autocmd("FileType", {
end,
})
-- reload some chadrc options on-save
autocmd("BufWritePost", {
pattern = vim.tbl_map(function(path)
return vim.fs.normalize(vim.loop.fs_realpath(path))
end, 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"
config = require("core.utils").load_config()
vim.g.nvchad_theme = config.ui.theme
vim.g.transparency = config.ui.transparency
-- statusline
require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme)
vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()"
-- tabufline
if config.ui.tabufline.enabled then
require("plenary.reload").reload_module "nvchad.tabufline.modules"
vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()"
end
require("base46").load_all_highlights()
-- vim.cmd("redraw!")
end,
})
-------------------------------------- commands ------------------------------------------
local new_cmd = vim.api.nvim_create_user_command

View File

@ -1,34 +1,8 @@
-- All plugins have lazy=true by default,to load a plugin on startup just lazy=false
-- List of all default plugins & their definitions
local default_plugins = {
"nvim-lua/plenary.nvim",
{
"NvChad/base46",
branch = "v2.0",
build = function()
require("base46").load_all_highlights()
end,
},
{
"NvChad/ui",
branch = "v2.0",
lazy = false,
},
{
"NvChad/nvterm",
init = function()
require("core.utils").load_mappings "nvterm"
end,
config = function(_, opts)
require "base46.term"
require("nvterm").setup(opts)
end,
},
{
"NvChad/nvim-colorizer.lua",
init = function()
@ -73,7 +47,6 @@ local default_plugins = {
{
"nvim-treesitter/nvim-treesitter",
tag = "v0.9.2",
init = function()
require("core.utils").lazy_load "nvim-treesitter"
end,