From 430d9ff9d6c338ee3a93add350f46d616273c430 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 28 May 2024 23:07:01 +0200 Subject: [PATCH] finally, peace --- lua/core/init.lua | 36 ------------------------------------ lua/plugins/init.lua | 27 --------------------------- 2 files changed, 63 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 19804e1..ce8db46 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -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 diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 27d9e7f..8f458ec 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -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,