chore(format)
This commit is contained in:
@@ -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,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)
|
||||
|
||||
@@ -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