Compare commits
14 Commits
db179859cc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d6dfbe4659 | |||
| 4f11874437 | |||
| fb38ee0071 | |||
| bdac891487 | |||
| 2f2a7595a9 | |||
| 4e6fc21d4a | |||
| a2f4bb71e7 | |||
| 8bbdc8639c | |||
| 214b7f2611 | |||
| 9152f3869f | |||
| 8e55b8a20d | |||
| 970adcc6ca | |||
| 48a9c09369 | |||
| 84ec08a97b |
@@ -7,13 +7,11 @@ local CONTRASTS = {
|
|||||||
|
|
||||||
---@class Config
|
---@class Config
|
||||||
---@field contrast Contrast
|
---@field contrast Contrast
|
||||||
---@field float_no_borders boolean
|
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
---@type Config
|
---@type Config
|
||||||
default = {
|
default = {
|
||||||
contrast = CONTRASTS.medium,
|
contrast = CONTRASTS.medium,
|
||||||
float_no_borders = true,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.setup_colors(colors)
|
function M.setup_colors(colors)
|
||||||
|
local theme = require("astrobox").theme
|
||||||
colors.buffer_active_bg = colors.tab_active_bg
|
colors.buffer_active_bg = colors.tab_active_bg
|
||||||
|
colors.buffer_fg = theme.statusbar.inactive.fg
|
||||||
return colors
|
return colors
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -62,12 +62,12 @@ return function(theme, palette)
|
|||||||
DiffText = theme.diff.bg.text,
|
DiffText = theme.diff.bg.text,
|
||||||
DiffAdded = { link = "DiffAdd" },
|
DiffAdded = { link = "DiffAdd" },
|
||||||
DiffRemoved = { link = "DiffDelete" },
|
DiffRemoved = { link = "DiffDelete" },
|
||||||
DiffChanged = { link = "DiffText" }, -- TODO Switch to DiffChange?
|
DiffChanged = { link = "DiffChange" },
|
||||||
DiffOldFile = theme.diff.normal.del,
|
DiffOldFile = theme.diff.normal.del,
|
||||||
DiffNewFile = theme.diff.normal.add,
|
DiffNewFile = theme.diff.normal.add,
|
||||||
DiffFile = theme.error, -- TODO What's this?
|
DiffFile = { fg = palette.purple, italic = true },
|
||||||
DiffLine = theme.error, -- TODO What's this?
|
DiffLine = { fg = palette.blue },
|
||||||
DiffIndexLine = theme.error,
|
DiffIndexLine = { fg = palette.yellow, italic = true },
|
||||||
|
|
||||||
-- Cmd
|
-- Cmd
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ return function(theme, palette)
|
|||||||
|
|
||||||
NeoTreeSymbolicLinkTarget = { fg = palette.aqua },
|
NeoTreeSymbolicLinkTarget = { fg = palette.aqua },
|
||||||
NeoTreeTabActive = theme.statusbar.inactive,
|
NeoTreeTabActive = theme.statusbar.inactive,
|
||||||
|
NeoTreeTabSeparatorActive = theme.statusbar.inactive,
|
||||||
NeoTreeTabInactive = theme.winbar.inactive,
|
NeoTreeTabInactive = theme.winbar.inactive,
|
||||||
|
NeoTreeTabSeparatorInactive = theme.winbar.inactive,
|
||||||
NeoTreeTitleBar = theme.popup.title2,
|
NeoTreeTitleBar = theme.popup.title2,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,21 +2,26 @@
|
|||||||
---@param palette Palette
|
---@param palette Palette
|
||||||
return function(theme, palette)
|
return function(theme, palette)
|
||||||
return {
|
return {
|
||||||
|
NotifyBackground = { link = "Normal" },
|
||||||
|
|
||||||
NotifyERRORBorder = theme.msg.error,
|
NotifyERRORBorder = theme.msg.error,
|
||||||
NotifyWARNBorder = theme.msg.warning,
|
NotifyWARNBorder = theme.msg.warning,
|
||||||
NotifyINFOBorder = theme.msg.info,
|
NotifyINFOBorder = theme.msg.info,
|
||||||
NotifyDEBUGBorder = theme.msg.hint,
|
NotifyDEBUGBorder = theme.msg.hint,
|
||||||
NotifyTRACEBorder = theme.msg.error,
|
NotifyTRACEBorder = theme.msg.error,
|
||||||
|
|
||||||
NotifyERRORIcon = { link = "NotifyERRORBorder" },
|
NotifyERRORIcon = { link = "NotifyERRORBorder" },
|
||||||
NotifyWARNIcon = { link = "NotifyWARNBorder" },
|
NotifyWARNIcon = { link = "NotifyWARNBorder" },
|
||||||
NotifyINFOIcon = { link = "NotifyINFOBorder" },
|
NotifyINFOIcon = { link = "NotifyINFOBorder" },
|
||||||
NotifyDEBUGIcon = { link = "NotifyDEBUGBorder" },
|
NotifyDEBUGIcon = { link = "NotifyDEBUGBorder" },
|
||||||
NotifyTRACEIcon = { link = "NotifyTRACEBorder" },
|
NotifyTRACEIcon = { link = "NotifyTRACEBorder" },
|
||||||
|
|
||||||
NotifyERRORTitle = { link = "NotifyERRORBorder" },
|
NotifyERRORTitle = { link = "NotifyERRORBorder" },
|
||||||
NotifyWARNTitle = { link = "NotifyWARNBorder" },
|
NotifyWARNTitle = { link = "NotifyWARNBorder" },
|
||||||
NotifyINFOTitle = { link = "NotifyINFOBorder" },
|
NotifyINFOTitle = { link = "NotifyINFOBorder" },
|
||||||
NotifyDEBUGTitle = { link = "NotifyDEBUGBorder" },
|
NotifyDEBUGTitle = { link = "NotifyDEBUGBorder" },
|
||||||
NotifyTRACETitle = { link = "NotifyTRACEBorder" },
|
NotifyTRACETitle = { link = "NotifyTRACEBorder" },
|
||||||
|
|
||||||
NotifyERRORBody = { link = "Normal" },
|
NotifyERRORBody = { link = "Normal" },
|
||||||
NotifyWARNBody = { link = "Normal" },
|
NotifyWARNBody = { link = "Normal" },
|
||||||
NotifyINFOBody = { link = "Normal" },
|
NotifyINFOBody = { link = "Normal" },
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ return function(theme, palette)
|
|||||||
Keyword = { fg = palette.red, bg = palette.none },
|
Keyword = { fg = palette.red, bg = palette.none },
|
||||||
Label = { link = "Keyword" },
|
Label = { link = "Keyword" },
|
||||||
Macro = { fg = palette.orange, bg = palette.none },
|
Macro = { fg = palette.orange, bg = palette.none },
|
||||||
Number = { fg = palette.yellow, bg = palette.none },
|
Number = { fg = palette.purple, bg = palette.none },
|
||||||
Operator = { fg = palette.orange, bg = palette.none },
|
Operator = { fg = palette.orange, bg = palette.none },
|
||||||
PreCondit = { link = "PreProc" },
|
PreCondit = { link = "PreProc" },
|
||||||
PreProc = { fg = palette.bg_gradiant[4], bg = palette.none },
|
PreProc = { fg = palette.bg_gradiant[4], bg = palette.none },
|
||||||
@@ -42,16 +42,16 @@ return function(theme, palette)
|
|||||||
DiagnosticHint = theme.msg.hint,
|
DiagnosticHint = theme.msg.hint,
|
||||||
DiagnosticInfo = theme.msg.info,
|
DiagnosticInfo = theme.msg.info,
|
||||||
DiagnosticWarn = theme.msg.warning,
|
DiagnosticWarn = theme.msg.warning,
|
||||||
DiagnosticUnderlineError = { sp = palette.red, undercurl = true },
|
DiagnosticUnderlineError = { sp = palette.red, bg = palette.colored_backgrounds.red },
|
||||||
DiagnosticUnderlineHint = { sp = palette.aqua, undercurl = true },
|
DiagnosticUnderlineHint = { sp = palette.aqua, bg = palette.colored_backgrounds.aqua },
|
||||||
DiagnosticUnderlineInfo = { sp = palette.blue, undercurl = true },
|
DiagnosticUnderlineInfo = { sp = palette.blue, bg = palette.colored_backgrounds.blue },
|
||||||
DiagnosticUnderlineWarn = { sp = palette.yellow, undercurl = true },
|
DiagnosticUnderlineWarn = { sp = palette.yellow, bg = palette.colored_backgrounds.yellow },
|
||||||
LspInlayHint = theme.conceal,
|
LspInlayHint = theme.conceal,
|
||||||
LspCodeLens = { link = "LspInlayHint" },
|
LspCodeLens = { link = "LspInlayHint" },
|
||||||
LspCodeLensSeparator = { link = "LspCodeLens" },
|
LspCodeLensSeparator = { link = "LspCodeLens" },
|
||||||
LspReferenceRead = theme.active,
|
LspReferenceRead = { fg = palette.none, bg = palette.colored_backgrounds.aqua },
|
||||||
LspReferenceWrite = { fg = palette.none, bg = palette.harder_bg },
|
LspReferenceWrite = { fg = palette.none, bg = palette.colored_backgrounds.orange },
|
||||||
LspReferenceText = theme.active,
|
LspReferenceText = { fg = palette.none, bg = palette.bg_gradiant[1] },
|
||||||
|
|
||||||
["@annotation"] = { fg = palette.yellow },
|
["@annotation"] = { fg = palette.yellow },
|
||||||
["@attribute"] = { fg = palette.yellow },
|
["@attribute"] = { fg = palette.yellow },
|
||||||
@@ -142,13 +142,16 @@ return function(theme, palette)
|
|||||||
["@lsp.type.string"] = { link = "@string" },
|
["@lsp.type.string"] = { link = "@string" },
|
||||||
["@lsp.type.struct"] = { link = "@struct" },
|
["@lsp.type.struct"] = { link = "@struct" },
|
||||||
["@lsp.type.typeParameter"] = { link = "@type" },
|
["@lsp.type.typeParameter"] = { link = "@type" },
|
||||||
|
["@lsp.type.unresolvedReference"] = { fg = palette.purple },
|
||||||
["@lsp.type.variable"] = { link = "@variable" },
|
["@lsp.type.variable"] = { link = "@variable" },
|
||||||
["@lsp.typemod.class.constructorOrDestructor"] = { link = "@constructor" },
|
["@lsp.typemod.class.constructorOrDestructor"] = { link = "@constructor" },
|
||||||
["@lsp.typemod.comment.documentation"] = { link = "@comment.documentation" },
|
["@lsp.typemod.comment.documentation"] = { link = "@comment.documentation" },
|
||||||
|
["@lsp.typemod.const.constant"] = { link = "Constant" },
|
||||||
|
["@lsp.typemod.constParameter.constant"] = { link = "Constant" },
|
||||||
["@lsp.typemod.derive.attribute"] = { fg = palette.blue },
|
["@lsp.typemod.derive.attribute"] = { fg = palette.blue },
|
||||||
["@lsp.typemod.method"] = { link = "@method" },
|
["@lsp.typemod.method"] = { link = "@method" },
|
||||||
["@lsp.typemod.selfKeyword"] = theme.highlight_bold,
|
["@lsp.typemod.selfKeyword"] = theme.highlight_bold,
|
||||||
["@lsp.typemod.string.attribute"] = { link = "String" }, -- Hmmmm
|
["@lsp.typemod.string.attribute"] = { link = "String" },
|
||||||
["@lsp.typemod.variable.readonly"] = { link = "Constant" },
|
["@lsp.typemod.variable.readonly"] = { link = "Constant" },
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return function()
|
return function()
|
||||||
return {
|
return {
|
||||||
IlluminatedWordText = { link = "LspeferenceText" },
|
IlluminatedWordText = { link = "LspReferenceText" },
|
||||||
IlluminatedWordRead = { link = "LspeferenceRead" },
|
IlluminatedWordRead = { link = "LspReferenceRead" },
|
||||||
IlluminatedWordWrite = { link = "LspeferenceWrite" },
|
IlluminatedWordWrite = { link = "LspReferenceWrite" },
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local config = require("astrobox.config")
|
local config = require("astrobox.config")
|
||||||
local palette = require("astrobox.palette")
|
|
||||||
local highlights = require("astrobox.highlights")
|
local highlights = require("astrobox.highlights")
|
||||||
|
local palette = require("astrobox.palette")
|
||||||
local theme = require("astrobox.theme")
|
local theme = require("astrobox.theme")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
@@ -19,7 +19,6 @@ function M.setup(user_cfg)
|
|||||||
M.cfg = config.make_config(user_cfg)
|
M.cfg = config.make_config(user_cfg)
|
||||||
-- If the colors are set, assume we're reloading and auto apply
|
-- If the colors are set, assume we're reloading and auto apply
|
||||||
if vim.g.colors_name == "astrobox" then
|
if vim.g.colors_name == "astrobox" then
|
||||||
vim.notify("Reloading", vim.log.levels.INFO, { title = "Astrobox" })
|
|
||||||
vim.cmd.colorscheme("astrobox")
|
vim.cmd.colorscheme("astrobox")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- untested
|
|
||||||
-- 0.6 with exceptions
|
-- 0.6 with exceptions
|
||||||
light = {
|
light = {
|
||||||
--- @type Colors
|
--- @type Colors
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
local colors = require("astrobox.palette.colors")
|
local colors = require("astrobox.palette.colors")
|
||||||
|
|
||||||
-- TODO Split into palette and theme (float, bars)?
|
|
||||||
|
|
||||||
--- @return Palette
|
--- @return Palette
|
||||||
return function(config)
|
return function(config)
|
||||||
local vimbg = vim.o.background
|
local vimbg = vim.o.background
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ function M.make_theme(P, C)
|
|||||||
conceal = { fg = P.bg_gradiant[3], bg = P.harder_bg },
|
conceal = { fg = P.bg_gradiant[3], bg = P.harder_bg },
|
||||||
active = { fg = P.none, bg = P.softer_bg },
|
active = { fg = P.none, bg = P.softer_bg },
|
||||||
}
|
}
|
||||||
|
T.error = { fg = "#000000", bg = "#FF00FF" }
|
||||||
T.colors = {
|
T.colors = {
|
||||||
accent = P.blue,
|
accent = P.blue,
|
||||||
accent2 = P.green,
|
accent2 = P.green,
|
||||||
@@ -66,17 +67,13 @@ function M.make_theme(P, C)
|
|||||||
separator = { fg = P.fg_gradiant[4], bg = P.none },
|
separator = { fg = P.fg_gradiant[4], bg = P.none },
|
||||||
}
|
}
|
||||||
T.popup = {
|
T.popup = {
|
||||||
normal = {
|
normal = T.normal,
|
||||||
fg = P.fg,
|
|
||||||
bg = P.bg_gradiant[1],
|
|
||||||
},
|
|
||||||
conceal = T.conceal,
|
conceal = T.conceal,
|
||||||
inactive = {
|
inactive = {
|
||||||
fg = P.fg_gradiant[4],
|
fg = P.fg_gradiant[4],
|
||||||
bg = P.bg_gradiant[2],
|
bg = P.bg_gradiant[2],
|
||||||
},
|
},
|
||||||
-- TODO Check if working good
|
border = T.windows.separator,
|
||||||
border = C.float_no_borders and { fg = P.none, bg = P.none } or T.windows.separator,
|
|
||||||
title = { fg = T.colors.accent2, bg = P.none, bold = true }, -- TODO need to switch to normal.bg?
|
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?
|
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,
|
bold = true,
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
fg = P.fg_gradiant[1],
|
fg = P.fg_gradiant[2],
|
||||||
bg = P.bg,
|
bg = P.bg,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -113,7 +110,7 @@ function M.make_theme(P, C)
|
|||||||
bg = P.bg,
|
bg = P.bg,
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
fg = P.bg_gradiant[3],
|
fg = P.fg_gradiant[4],
|
||||||
bg = P.harder_bg,
|
bg = P.harder_bg,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -135,8 +132,6 @@ function M.make_theme(P, C)
|
|||||||
P.aqua,
|
P.aqua,
|
||||||
P.fg,
|
P.fg,
|
||||||
}
|
}
|
||||||
|
|
||||||
T.error = { fg = "#000000", bg = "#FF00FF" }
|
|
||||||
return T
|
return T
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
6
neovim.yml
Normal file
6
neovim.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
base: lua51
|
||||||
|
|
||||||
|
globals:
|
||||||
|
vim:
|
||||||
|
any: true
|
||||||
8
selene.toml
Normal file
8
selene.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
std = "neovim"
|
||||||
|
|
||||||
|
[rules]
|
||||||
|
global_usage = "allow"
|
||||||
|
if_same_then_else = "allow"
|
||||||
|
incorrect_standard_library_use = "allow"
|
||||||
|
mixed_table = "allow"
|
||||||
|
multiple_statements = "allow"
|
||||||
8
stylua.toml
Normal file
8
stylua.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
column_width = 120
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
call_parentheses = "Always"
|
||||||
|
collapse_simple_statement = "Never"
|
||||||
|
|
||||||
|
[sort_requires]
|
||||||
|
enabled = true
|
||||||
Reference in New Issue
Block a user