Compare commits
4 Commits
db179859cc
...
8e55b8a20d
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e55b8a20d | |||
| 970adcc6ca | |||
| 48a9c09369 | |||
| 84ec08a97b |
@@ -7,20 +7,16 @@ local CONTRASTS = {
|
||||
|
||||
---@class Config
|
||||
---@field contrast Contrast
|
||||
---@field float_no_borders boolean
|
||||
|
||||
local M = {
|
||||
---@type Config
|
||||
default = {
|
||||
contrast = CONTRASTS.medium,
|
||||
float_no_borders = true,
|
||||
},
|
||||
}
|
||||
|
||||
---@param user_cfg Config
|
||||
---@return Config
|
||||
function M.make_config(user_cfg)
|
||||
return user_cfg and vim.tbl_extend("force", M.default, user_cfg) or M.default
|
||||
end
|
||||
function M.make_config(user_cfg) return user_cfg and vim.tbl_extend("force", M.default, user_cfg) or M.default end
|
||||
|
||||
return M
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
local M = {}
|
||||
|
||||
function M.setup_colors(colors)
|
||||
local theme = require("astrobox").theme
|
||||
colors.buffer_active_bg = colors.tab_active_bg
|
||||
colors.buffer_fg = theme.statusbar.inactive.fg
|
||||
return colors
|
||||
end
|
||||
|
||||
|
||||
@@ -24,7 +24,9 @@ return function(theme, palette)
|
||||
|
||||
NeoTreeSymbolicLinkTarget = { fg = palette.aqua },
|
||||
NeoTreeTabActive = theme.statusbar.inactive,
|
||||
NeoTreeTabSeparatorActive = theme.statusbar.inactive,
|
||||
NeoTreeTabInactive = theme.winbar.inactive,
|
||||
NeoTreeTabSeparatorInactive = theme.winbar.inactive,
|
||||
NeoTreeTitleBar = theme.popup.title2,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local config = require("astrobox.config")
|
||||
local palette = require("astrobox.palette")
|
||||
local highlights = require("astrobox.highlights")
|
||||
local palette = require("astrobox.palette")
|
||||
local theme = require("astrobox.theme")
|
||||
|
||||
local M = {
|
||||
@@ -18,10 +18,7 @@ local M = {
|
||||
function M.setup(user_cfg)
|
||||
M.cfg = config.make_config(user_cfg)
|
||||
-- If the colors are set, assume we're reloading and auto apply
|
||||
if vim.g.colors_name == "astrobox" then
|
||||
vim.notify("Reloading", vim.log.levels.INFO, { title = "Astrobox" })
|
||||
vim.cmd.colorscheme("astrobox")
|
||||
end
|
||||
if vim.g.colors_name == "astrobox" then vim.cmd.colorscheme("astrobox") end
|
||||
end
|
||||
|
||||
function M.set_highlights(list)
|
||||
|
||||
@@ -16,6 +16,7 @@ function M.make_theme(P, C)
|
||||
conceal = { fg = P.bg_gradiant[3], bg = P.harder_bg },
|
||||
active = { fg = P.none, bg = P.softer_bg },
|
||||
}
|
||||
T.error = { fg = "#000000", bg = "#FF00FF" }
|
||||
T.colors = {
|
||||
accent = P.blue,
|
||||
accent2 = P.green,
|
||||
@@ -66,17 +67,13 @@ function M.make_theme(P, C)
|
||||
separator = { fg = P.fg_gradiant[4], bg = P.none },
|
||||
}
|
||||
T.popup = {
|
||||
normal = {
|
||||
fg = P.fg,
|
||||
bg = P.bg_gradiant[1],
|
||||
},
|
||||
normal = T.normal,
|
||||
conceal = T.conceal,
|
||||
inactive = {
|
||||
fg = P.fg_gradiant[4],
|
||||
bg = P.bg_gradiant[2],
|
||||
},
|
||||
-- TODO Check if working good
|
||||
border = C.float_no_borders and { fg = P.none, bg = P.none } or T.windows.separator,
|
||||
border = T.windows.separator,
|
||||
title = { fg = T.colors.accent2, bg = P.none, bold = true }, -- TODO need to switch to normal.bg?
|
||||
title2 = { fg = T.colors.accent3, bg = P.none, bold = true }, -- TODO need to switch to normal.bg?
|
||||
}
|
||||
@@ -99,7 +96,7 @@ function M.make_theme(P, C)
|
||||
bold = true,
|
||||
},
|
||||
inactive = {
|
||||
fg = P.fg_gradiant[1],
|
||||
fg = P.fg_gradiant[2],
|
||||
bg = P.bg,
|
||||
},
|
||||
}
|
||||
@@ -113,7 +110,7 @@ function M.make_theme(P, C)
|
||||
bg = P.bg,
|
||||
},
|
||||
inactive = {
|
||||
fg = P.bg_gradiant[3],
|
||||
fg = P.fg_gradiant[4],
|
||||
bg = P.harder_bg,
|
||||
},
|
||||
}
|
||||
@@ -135,8 +132,6 @@ function M.make_theme(P, C)
|
||||
P.aqua,
|
||||
P.fg,
|
||||
}
|
||||
|
||||
T.error = { fg = "#000000", bg = "#FF00FF" }
|
||||
return T
|
||||
end
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@ function M.visit_astrobox_modules(module, visitor)
|
||||
end
|
||||
while true do
|
||||
local entry, type = vim.loop.fs_scandir_next(hdl)
|
||||
if entry == nil then
|
||||
break
|
||||
end
|
||||
if entry == nil then break end
|
||||
if type == "file" and vim.endswith(entry, ".lua") then
|
||||
local mod_name = entry:sub(0, -5) -- cut extension
|
||||
local ok, mod = pcall(require, "astrobox." .. module .. "." .. mod_name)
|
||||
|
||||
Reference in New Issue
Block a user