restructure file module structure

v2.5
siduck 4 years ago
parent 6689ebc11e
commit 200e308561

@ -6,7 +6,7 @@
## Contribute for new themes ## Contribute for new themes
- go to hl_themes and add your file, ex: atheme.lua - go to base46/themes and add your file, ex: atheme.lua
```lua ```lua
-- atheme.lua file be like -- atheme.lua file be like

@ -3,7 +3,7 @@ local ui = require("core.utils").load_config().ui
local merge_tb = require("base46").merge_tb local merge_tb = require("base46").merge_tb
local highlights = {} local highlights = {}
local hl_dir = vim.fn.stdpath "data" .. "/site/pack/packer/opt/base46/lua/integrations" local hl_dir = vim.fn.stdpath "data" .. "/site/pack/packer/opt/base46/lua/base46/integrations"
-- push hl_dir file names to table -- push hl_dir file names to table
local hl_files = require("plenary.scandir").scan_dir(hl_dir, {}) local hl_files = require("plenary.scandir").scan_dir(hl_dir, {})
@ -12,7 +12,7 @@ for _, file in ipairs(hl_files) do
local a = vim.fn.fnamemodify(file, ":t") local a = vim.fn.fnamemodify(file, ":t")
a = vim.fn.fnamemodify(a, ":r") a = vim.fn.fnamemodify(a, ":r")
local integration = require("integrations." .. a) local integration = require("base46.integrations." .. a)
highlights = merge_tb(highlights, integration) highlights = merge_tb(highlights, integration)
end end
@ -48,7 +48,7 @@ end
-- local set_transparent = nvchad.load_config().ui.transparency -- local set_transparent = nvchad.load_config().ui.transparency
if vim.g.transparency then if vim.g.transparency then
highlights = merge_tb(highlights, require "nv_glassy") highlights = merge_tb(highlights, require "base46.glassy")
end end
-- finally set all highlights :D -- finally set all highlights :D

@ -3,7 +3,7 @@ local g = vim.g
local config = require("core.utils").load_config() local config = require("core.utils").load_config()
M.get_theme_tb = function(name, type) M.get_theme_tb = function(name, type)
local default_path = "hl_themes." .. name local default_path = "base46.themes." .. name
local user_path = "custom.themes." .. name local user_path = "custom.themes." .. name
local present1, default_theme = pcall(require, default_path) local present1, default_theme = pcall(require, default_path)
@ -46,15 +46,8 @@ M.load_theme = function()
local theme_type = M.get_theme_tb(g.nvchad_theme, "type") -- dark/light local theme_type = M.get_theme_tb(g.nvchad_theme, "type") -- dark/light
vim.opt.bg = theme_type vim.opt.bg = theme_type
M.clear_highlights "BufferLine" require "base46.term"
M.clear_highlights "TS" require "base46.chadlights"
-- reload highlights for theme switcher
require("plenary.reload").reload_module "integrations"
require("plenary.reload").reload_module "chadlights"
require("plenary.reload").reload_module "custom"
require "chadlights"
end end
M.override_theme = function(default_theme, theme_name) M.override_theme = function(default_theme, theme_name)

@ -7,6 +7,11 @@ return {
bg = colors.black2, bg = colors.black2,
}, },
BufferlineIndicatorVisible = {
fg = colors.black2,
bg = colors.black2,
},
-- buffers -- buffers
BufferLineBufferSelected = { BufferLineBufferSelected = {
fg = colors.white, fg = colors.white,

@ -177,7 +177,7 @@ return {
}, },
St_cwd_icon = { St_cwd_icon = {
fg = colors.black, fg = colors.one_bg,
bg = colors.red, bg = colors.red,
}, },

@ -0,0 +1,18 @@
local colors = require("base46").get_colors "base_16"
vim.g.terminal_color_0 = colors.base00
vim.g.terminal_color_1 = colors.base08
vim.g.terminal_color_2 = colors.base0B
vim.g.terminal_color_3 = colors.base0A
vim.g.terminal_color_4 = colors.base0D
vim.g.terminal_color_5 = colors.base0E
vim.g.terminal_color_6 = colors.base0C
vim.g.terminal_color_7 = colors.base05
vim.g.terminal_color_8 = colors.base03
vim.g.terminal_color_9 = colors.base08
vim.g.terminal_color_10 = colors.base0B
vim.g.terminal_color_11 = colors.base0A
vim.g.terminal_color_12 = colors.base0D
vim.g.terminal_color_13 = colors.base0E
vim.g.terminal_color_14 = colors.base0C
vim.g.terminal_color_15 = colors.base07

@ -29,7 +29,7 @@ M.base_30 = {
cyan = "#a3b8ef", cyan = "#a3b8ef",
statusline_bg = "#22262e", statusline_bg = "#22262e",
lightbg = "#2d3139", lightbg = "#2d3139",
pmenu_bg = "#98c379", pmenu_bg = "#61afef",
folder_bg = "#61afef", folder_bg = "#61afef",
} }
Loading…
Cancel
Save