load base46_cache in instead of minified modules

This commit is contained in:
siduck 2022-11-19 11:45:33 +05:30
parent c16c22e87b
commit d27029d1b1
11 changed files with 13 additions and 12 deletions

View file

@ -14,7 +14,7 @@ if fn.empty(fn.glob(install_path)) > 0 then
print "Cloning packer .." print "Cloning packer .."
fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }
os.execute("mkdir -p " .. vim.fn.stdpath "data" .. "/site/pack/base46_cache/start/compiled_themes/lua/base46_cache/") os.execute("mkdir -p " .. vim.g.base46_cache)
-- install plugins + compile their configs -- install plugins + compile their configs
vim.cmd "packadd packer.nvim" vim.cmd "packadd packer.nvim"

View file

@ -3,6 +3,7 @@ local g = vim.g
local config = require("core.utils").load_config() local config = require("core.utils").load_config()
g.nvchad_theme = config.ui.theme g.nvchad_theme = config.ui.theme
g.base46_cache = vim.fn.stdpath "cache" .. "/nvchad/base46/"
g.toggle_theme_icon = "" g.toggle_theme_icon = ""
g.transparency = config.ui.transparency g.transparency = config.ui.transparency

View file

@ -4,7 +4,7 @@ if not present then
return return
end end
require "base46_cache.cmp" loadfile(vim.g.base46_cache .. "cmp")()
vim.o.completeopt = "menu,menuone,noselect" vim.o.completeopt = "menu,menuone,noselect"

View file

@ -4,7 +4,7 @@ if not present then
return return
end end
require "base46_cache.lsp" loadfile(vim.g.base46_cache .. "lsp")()
require "nvchad_ui.lsp" require "nvchad_ui.lsp"
local M = {} local M = {}

View file

@ -8,7 +8,7 @@ vim.api.nvim_create_augroup("_mason", { clear = true })
vim.api.nvim_create_autocmd("Filetype", { vim.api.nvim_create_autocmd("Filetype", {
pattern = "mason", pattern = "mason",
callback = function() callback = function()
require "base46_cache.mason" loadfile(vim.g.base46_cache .. "mason")()
end, end,
group = "_mason", group = "_mason",
}) })

View file

@ -4,7 +4,7 @@ if not present then
return return
end end
require "base46_cache.nvimtree" loadfile(vim.g.base46_cache .. "nvimtree")()
local options = { local options = {
filters = { filters = {

View file

@ -30,7 +30,7 @@ M.blankline = function()
return return
end end
require "base46_cache.blankline" loadfile(vim.g.base46_cache .. "blankline")()
local options = { local options = {
indentLine_enabled = 1, indentLine_enabled = 1,
@ -135,7 +135,7 @@ M.gitsigns = function()
return return
end end
require "base46_cache.git" loadfile(vim.g.base46_cache .. "git")()
local options = { local options = {
signs = { signs = {
@ -159,7 +159,7 @@ M.devicons = function()
local present, devicons = pcall(require, "nvim-web-devicons") local present, devicons = pcall(require, "nvim-web-devicons")
if present then if present then
require "base46_cache.devicons" loadfile(vim.g.base46_cache .. "devicons")()
local options = { override = require("nvchad_ui.icons").devicons } local options = { override = require("nvchad_ui.icons").devicons }
options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons") options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons")

View file

@ -4,7 +4,7 @@ if not present then
return return
end end
require "base46_cache.telescope" loadfile(vim.g.base46_cache .. "telescope")()
local options = { local options = {
defaults = { defaults = {

View file

@ -4,7 +4,7 @@ if not present then
return return
end end
require "base46_cache.treesitter" loadfile(vim.g.base46_cache .. "treesitter")()
local options = { local options = {
ensure_installed = { ensure_installed = {

View file

@ -4,7 +4,7 @@ if not present then
return return
end end
require "base46_cache.whichkey" loadfile(vim.g.base46_cache .. "whichkey")()
local options = { local options = {

View file

@ -29,7 +29,7 @@ local plugins = {
["NvChad/base46"] = { ["NvChad/base46"] = {
branch = "dev", branch = "dev",
config = function() config = function()
pcall(require, "base46_cache.defaults") loadfile(vim.g.base46_cache .. "defaults")()
end, end,
}, },