Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: remove popup, add plugins, fix user config not saving and more #89

Merged
merged 28 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5f67f89
refactor(util): move live reload in to a function
A-Lamia Jul 31, 2023
345868d
feat(cmp): move match highlights to text_match property
A-Lamia Jul 31, 2023
c727021
feat(spotlight): add support for spotlight
A-Lamia Jul 31, 2023
df79787
feat(telescope): initial restructure to support prompt background
A-Lamia Jul 31, 2023
d854890
feat(base): move cursor to ui.text property
A-Lamia Jul 31, 2023
62d0a27
feat(lazy): move to NormalFloat
A-Lamia Jul 31, 2023
4fee2f6
feat(mason): move to NormalFloat
A-Lamia Jul 31, 2023
cf2744d
feat(spotlight): update spotlight to work with transparency
A-Lamia Jul 31, 2023
0ea1294
feat(base): make machparen stand out more, closes: #77
A-Lamia Jul 31, 2023
e52f4f7
feat(base): add transparency option to cursorline
A-Lamia Jul 31, 2023
4c494db
feat(base): make substitute more bold and noticeable
A-Lamia Jul 31, 2023
3fd2330
feat(base): change pmenusel to use the menu_selection property
A-Lamia Jul 31, 2023
8166db3
feat(base): disable any blend on pmenuthumb
A-Lamia Jul 31, 2023
aca20e9
feat(base): change wildmenu background to use accent
A-Lamia Jul 31, 2023
81f6e26
feat(base): disable blend on title background if title_invert
A-Lamia Jul 31, 2023
bf9f656
feat(base): rework logic for float highlight family
A-Lamia Jul 31, 2023
9c8848d
feat(neo-tree) rework neotree logic and highlight style
A-Lamia Jul 31, 2023
03cdfc0
feat(notify): rework logic and highlights
A-Lamia Jul 31, 2023
87cfd17
feat: movee Pmenu to float
A-Lamia Aug 12, 2023
ba685d2
feat: add transparency to notify
A-Lamia Aug 12, 2023
e54f02f
feat: add mini.start support
A-Lamia Aug 12, 2023
e8a8bb0
fix!: remove popup as it is to difficult to manage
A-Lamia Oct 11, 2023
0d62bdf
feat(astrodark): update to color palette
A-Lamia Oct 11, 2023
70686c8
fix(spotlight): add syntax text
A-Lamia Oct 11, 2023
a643832
fix(wezterm): update wezterm astrodark palette
A-Lamia Oct 11, 2023
62a3cd1
fix(astrolight): added missing prompt palette
A-Lamia Oct 11, 2023
ecadf87
docs: add prompt to docs
A-Lamia Oct 11, 2023
1bb3dd9
chore: clean up linting
mehalter Oct 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ require("astrotheme").setup({
transparent = false, -- Bool value, toggles transparency.
inactive = true, -- Bool value, toggles inactive window color.
float = true, -- Bool value, toggles floating windows background colors.
popup = true, -- Bool value, toggles popup background color.
neotree = true, -- Bool value, toggles neo-trees background color.
border = true, -- Bool value, toggles borders.
title_invert = true, -- Bool value, swaps text and background colors.
Expand Down Expand Up @@ -176,7 +175,6 @@ ui.base
ui.inactive_base
ui.statusline
ui.split
ui.popup
ui.float
ui.title
ui.border
Expand All @@ -191,6 +189,8 @@ ui.text_active
ui.text_inactive
ui.text_match

ui.prompt

--------------------------------
--- terminal
--------------------------------
Expand Down
2 changes: 0 additions & 2 deletions doc/astrotheme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ OPTIONS *astrotheme-options*
transparent = false, -- Bool value, toggles transparency.
inactive = true, -- Bool value, toggles inactive window color.
float = true, -- Bool value, toggles floating windows background colors.
popup = true, -- Bool value, toggles popup background color.
neotree = true, -- Bool value, toggles neo-trees background color.
border = true, -- Bool value, toggles borders.
title_invert = true, -- Bool value, swaps text and background colors.
Expand Down Expand Up @@ -159,7 +158,6 @@ modifiable palette names ~
ui.inactive_base
ui.statusline
ui.split
ui.popup
ui.float
ui.title
ui.border
Expand Down
12 changes: 7 additions & 5 deletions extras/wezterm/wezterm_astrodark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,22 @@ c.ui.base = "#1A1D23"
c.ui.inactive_base = "#16181D"
c.ui.statusline = "#111317"
c.ui.split = "#111317"
c.ui.popup = "#16181D"
c.ui.float = "#16181D"
c.ui.float = "#14161B"
c.ui.title = c.ui.accent
c.ui.border = "#7A7C7E"
c.ui.border = "#3A3E47"
c.ui.current_line = "#1E222A"
c.ui.scrollbar = c.ui.accent
c.ui.selection = "#26343F"
c.ui.menu_selection = c.ui.accent
c.ui.highlight = "#1E222A"
c.ui.highlight = "#23272F"
c.ui.none_text = "#3A3E47"
c.ui.text = "#9B9FA9"
c.ui.text_active = "#ADB0BB"
c.ui.text_inactive = "#494D56"
c.ui.text_match = c.ui.accent
c.ui.text_match = "#E0E0Ee"

c.ui.prompt = "#21242A"
c.ui.results = "#131519"

--------------------------------
--- Terminal
Expand Down
54 changes: 23 additions & 31 deletions lua/astrotheme/groups/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,34 @@ local function callback(opts)
FloatTitle = {
fg = (opts.title_invert and C.ui.tool) or C.ui.title,
bg = (opts.title_invert and C.ui.title)
or (opts.inactive and C.ui.float)
or (opts.transparent and opts.float and C.ui.base)
or (opts.float and C.ui.float)
or (opts.transparent and C.none)
or C.ui.base,
blend = vim.o.winblend or 0,
bold = true,
},
FloatBorder = {
fg = (opts.border and opts.float and C.ui.border) or (opts.float and C.ui.float) or C.ui.base,
bg = (opts.float and C.ui.float) or (opts.transparent and C.none) or C.ui.base,
fg = (opts.border and opts.float and C.ui.border)
or (opts.transparent and opts.float and C.ui.base)
or (opts.float and C.ui.float)
or C.ui.base,
bg = (opts.inactive and C.ui.float)
or (opts.transparent and opts.float and C.ui.base)
or (opts.float and C.ui.float)
or (opts.transparent and C.none)
or C.ui.base,
blend = vim.o.winblend or 0,
},
NormalFloat = {
fg = C.ui.text,
bg = (opts.float and C.ui.float) or (opts.transparent and C.none) or C.ui.base,
},

--------------------
--- Popup
--------------------
PopupTitle = {
fg = (opts.title_invert and C.ui.tool) or C.ui.title,
bg = (opts.title_invert and C.ui.title)
or (opts.inactive and C.ui.base)
or (opts.popup and C.ui.popup)
bg = (opts.inactive and C.ui.float)
or (opts.transparent and opts.float and C.ui.base)
or (opts.float and C.ui.float)
or (opts.transparent and C.none)
or C.ui.base,
blend = vim.o.winblend or 0,
bold = true,
},
PopupBorder = {
fg = (opts.border and C.ui.border) or (opts.inactive and C.ui.base) or (opts.popup and C.ui.popup) or C.ui.base,
bg = (opts.inactive and C.ui.base) or (opts.popup and C.ui.popup) or (opts.transparent and C.none) or C.ui.base,
blend = vim.o.winblend or 0,
},
NormalPopup = {
fg = C.ui.text,
bg = (opts.inactive and C.ui.base) or (opts.popup and C.ui.popup) or (opts.transparent and C.none) or C.ui.base,
},

--------------------
Expand Down Expand Up @@ -108,7 +99,7 @@ local function callback(opts)
--------------------
--- UI
--------------------
Cursor = { fg = C.ui.base, bg = C.syntax.text },
Cursor = { fg = C.ui.base, bg = C.ui.text },
CursorIM = { link = "Cursor" },
lCursor = { link = "Cursor" },

Expand Down Expand Up @@ -155,20 +146,20 @@ local function callback(opts)
--------------------
--- Menu
--------------------
Pmenu = { fg = C.ui.text, bg = C.ui.popup },
PmenuSel = { fg = C.none, bg = C.ui.current_line },
PmenuSbar = { fg = C.none, bg = C.ui.tabline },
PmenuThumb = { fg = C.none, bg = C.ui.scrollbar },
Pmenu = { fg = C.ui.text, bg = C.ui.float },
PmenuSel = { fg = C.ui.base, bg = C.ui.menu_selection, bold = true, blend = 0 },
PmenuSbar = { fg = C.none, bg = C.ui.float },
PmenuThumb = { fg = C.none, bg = C.ui.scrollbar, blend = 0 },

WildMenu = { fg = C.ui.base, bg = C.syntax.blue },
WildMenu = { fg = C.ui.base, bg = C.ui.accent },

--------------------
--- Search & Select
--------------------
Search = { fg = C.none, bg = C.ui.selection },
IncSearch = { fg = C.ui.base, bg = C.ui.purple },
Substitute = { fg = C.ui.base, bg = C.ui.red, bold = true },
CurSearch = { link = "IncSearch" },
MatchParen = { fg = C.none, bg = C.ui.highlight },
Visual = { fg = C.none, bg = C.ui.selection },
VisualNOS = { fg = C.ui.selection, bg = C.none },

Expand All @@ -177,7 +168,8 @@ local function callback(opts)
--------------------
CursorColumn = { fg = C.none, bg = C.ui.current_line },
ColorColumn = { fg = C.none, bg = C.ui.current_line }, -- NOTE: Find better color
CursorLine = { fg = C.none, bg = C.ui.current_line },
CursorLine = { fg = C.none, bg = opts.transparent and C.none or C.ui.current_line },
MatchParen = { fg = C.ui.orange, bg = C.none, bold = true },

--------------------
--- Spell
Expand Down
2 changes: 2 additions & 0 deletions lua/astrotheme/groups/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ return {
["nvim-web-devicons"] = "nvim-web-devicons",
["nvim-window-picker"] = "nvim-window-picker",
["mason.nvim"] = "mason",
["mini.starter"] = "ministarter",
["rainbow-delimiters.nvim"] = "rainbow-delimiters",
["spotlight.nvim"] = "spotlight",
["symbols-outline.nvim"] = "symbols-outline",
["telescope.nvim"] = "telescope",
["vimwiki"] = "vimwiki",
Expand Down
2 changes: 1 addition & 1 deletion lua/astrotheme/groups/plugins/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local function callback()
LazyH1 = { fg = C.ui.base, bg = C.ui.accent, bold = true }, -- home button
LazyH2 = { fg = C.ui.accent, bold = true }, -- titles
LazyComment = { link = "Comment" },
LazyNormal = { link = "NormalPopup" },
LazyNormal = { link = "NormalFloat" },
LazyCommit = { fg = C.ui.text_inactive, bold = true }, -- commit ref
LazyCommitIssue = { fg = C.ui.yellow },
LazyCommitType = { fg = C.ui.accent, bold = true }, -- conventional commit type
Expand Down
4 changes: 2 additions & 2 deletions lua/astrotheme/groups/plugins/mason.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local function callback()
return {
MasonNormal = { link = "NormalPopup" },
MasonHeader = { link = "PopupTitle" },
MasonNormal = { link = "NormalFloat" },
MasonHeader = { link = "FloatTitle" },
MasonHeaderSecondary = { bold = true, fg = C.ui.base, bg = C.ui.blue },

MasonHighlight = { fg = C.ui.blue },
Expand Down
15 changes: 15 additions & 0 deletions lua/astrotheme/groups/plugins/ministarter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local function callback()
return {
MiniStarterItem = { fg = C.ui.text },
MiniStarterQuery = { fg = C.ui.green, bold = true },
MiniStarterHeader = { fg = C.ui.accent, bg = C.none },
MiniStarterFooter = { fg = C.ui.accent, bg = C.none },
MiniStarterCurrent = { fg = C.ui.text_active, underline = true, bold = true },
MiniStarterSection = { fg = C.ui.accent, bold = true },
MiniStarterInactive = { fg = C.ui.text_inactive },
MiniStarterItemBullet = { fg = C.ui.accent },
MiniStarterItemPrefix = { fg = C.ui.yellow },
}
end

return callback
27 changes: 23 additions & 4 deletions lua/astrotheme/groups/plugins/neo-tree.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
local function callback(opts)
return {
NeoTreeDirectoryIcon = { fg = C.ui.blue },
NeoTreeRootName = { fg = C.ui.text, bold = true },
NeoTreeRootName = { fg = C.ui.text_active, bold = true },
NeoTreeFileName = { fg = C.ui.text },
NeoTreeFileIcon = { fg = C.ui.text },
NeoTreeFileNameOpened = { fg = C.ui.green },
NeoTreeFloatBorder = { fg = C.ui.border },
NeoTreeFloatTitle = { fg = C.ui.title, bg = C.ui.tool },
NeoTreeFloatBorder = { fg = C.ui.float },
NeoTreeFloatTitle = {
fg = opts.title_invert and C.ui.tool or C.ui.title,
bg = opts.title_invert and opts.title or C.ui.tool,
bold = true,
},
NeoTreeIndentMarker = { fg = C.ui.none_text },

NeoTreeGitAdded = { fg = C.ui.green },
NeoTreeGitConflict = { fg = C.ui.red },
NeoTreeGitDeleted = { fg = C.ui.text_inactive },
NeoTreeGitIgnored = { fg = C.ui.text },
NeoTreeGitModified = { fg = C.ui.orange },
NeoTreeGitRenamed = { fg = C.ui.orange },
NeoTreeGitStaged = { fg = C.ui.cyan },
NeoTreeGitUntracked = { fg = C.ui.yellow },
NeoTreeTitleBar = { fg = C.ui.tool, bg = C.ui.border },
NeoTreeGitUnstaged = { fg = C.ui.yellow },

NeoTreeTitleBar = {
fg = opts.title_invert and C.ui.tool or C.ui.title,
bg = (opts.title_invert and C.ui.title)
or (opts.neotree and C.ui.tool)
or (opts.transparent and C.none)
or C.ui.base,
bold = true,
},
NeoTreeNormal = {
fg = C.ui.text,
bg = (opts.neotree and C.ui.tool) or (opts.transparent and C.none) or C.ui.base,
Expand All @@ -32,6 +50,7 @@ local function callback(opts)
NeoTreeTabSeparatorInactive = { fg = C.ui.tabline, bg = C.ui.tabline },
NeoTreeVertSplit = { fg = C.ui.split, bg = opts.transparent and C.none or C.ui.base },
NeoTreeWinSeparator = { fg = C.ui.split, bg = opts.transparent and C.none or C.ui.base, bold = true },
NeoTreeCursorLine = { link = "PmenuSel" },
}
end

Expand Down
4 changes: 2 additions & 2 deletions lua/astrotheme/groups/plugins/nvim-cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ local function callback()
return {
CmpItemAbbr = { fg = C.ui.text },
CmpItemAbbrDeprecated = { fg = C.syntax.red, strikethrough = true },
CmpItemAbbrMatch = { fg = C.ui.accent },
CmpItemAbbrMatchFuzzy = { fg = C.ui.accent },
CmpItemAbbrMatch = { fg = C.ui.text_match, bold = true },
CmpItemAbbrMatchFuzzy = { fg = C.ui.text_match, bold = true },
CmpItemKind = { fg = C.syntax.yellow },
CmpItemKindClass = { link = "@type" },
CmpItemKindColor = { link = "@constant" },
Expand Down
58 changes: 34 additions & 24 deletions lua/astrotheme/groups/plugins/nvim-notify.lua
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
local function callback()
local function callback(opts)
local bg = (opts.transparent and C.none) or C.ui.tool

return {
NotifyBackground = { bg = C.ui.base },
NotifyERRORBorder = { fg = C.ui.red },
NotifyWARNBorder = { fg = C.ui.orange },
NotifyINFOBorder = { fg = C.ui.green },
NotifyDEBUGBorder = { fg = C.ui.cyan },
NotifyTRACERBorder = { fg = C.ui.purple },
NotifyERRORIcon = { fg = C.ui.red },
NotifyWARNIcon = { fg = C.ui.orange },
NotifyINFOIcon = { fg = C.ui.green },
NotifyDEBUGIcon = { fg = C.ui.cyan },
NotifyTRACEIcon = { fg = C.ui.purple },
NotifyERRORTitle = { fg = C.ui.red },
NotifyWARNTitle = { fg = C.ui.orange },
NotifyINFOTitle = { fg = C.ui.green },
NotifyDEBUGTitle = { fg = C.ui.cyan },
NotifyTRACETitle = { fg = C.ui.purple },
NotifyERRORBody = { fg = C.ui.text },
NotifyWARNBody = { fg = C.ui.text },
NotifyINFOBody = { fg = C.ui.text },
NotifyDEBUGBody = { fg = C.ui.text },
NotifyTRACEBody = { fg = C.ui.text },
NotifyLogTime = { fg = C.ui.text_inactive },
NotifyLogTitle = { fg = C.ui.blue },
NotifyBackground = {
fg = C.ui.text,
bg = C.ui.base,
},

NotifyERRORBorder = { fg = C.ui.red, bg = bg },
NotifyWARNBorder = { fg = C.ui.orange, bg = bg },
NotifyINFOBorder = { fg = C.ui.green, bg = bg },
NotifyDEBUGBorder = { fg = C.ui.cyan, bg = bg },
NotifyTRACERBorder = { fg = C.ui.purple, bg = bg },

NotifyERRORIcon = { fg = C.ui.red, bg = bg },
NotifyWARNIcon = { fg = C.ui.orange, bg = bg },
NotifyINFOIcon = { fg = C.ui.green, bg = bg },
NotifyDEBUGIcon = { fg = C.ui.cyan, bg = bg },
NotifyTRACEIcon = { fg = C.ui.purple, bg = bg },

NotifyERRORTitle = { fg = C.ui.red, bg = bg },
NotifyWARNTitle = { fg = C.ui.orange, bg = bg },
NotifyINFOTitle = { fg = C.ui.green, bg = bg },
NotifyDEBUGTitle = { fg = C.ui.cyan, bg = bg },
NotifyTRACETitle = { fg = C.ui.purple, bg = bg },

NotifyERRORBody = { fg = C.ui.text, bg = bg },
NotifyWARNBody = { fg = C.ui.text, bg = bg },
NotifyINFOBody = { fg = C.ui.text, bg = bg },
NotifyDEBUGBody = { fg = C.ui.text, bg = bg },
NotifyTRACEBody = { fg = C.ui.text, bg = bg },

NotifyLogTime = { fg = C.ui.text_inactive, bg = bg },
NotifyLogTitle = { fg = C.ui.blue, bg = bg },
}
end

Expand Down
35 changes: 35 additions & 0 deletions lua/astrotheme/groups/plugins/spotlight.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
local function callback(opts)
local bg = (opts.float and C.ui.base) or (opts.transparent and C.none) or C.ui.base
local blend = vim.o.winblend or 0

return {
SpotlightTitle = {
fg = (opts.title_invert and C.ui.base) or C.ui.title,
bg = (opts.title_invert and C.ui.title) or (opts.transparent and C.none) or C.ui.base,
blend = opts.title_invert and 0 or vim.o.winblend or 0,
bold = true,
},
SpotlightBorder = {
fg = opts.border and C.ui.border or C.ui.base,
bg = bg,
blend = blend,
},
SpotlightNormal = {
fg = C.ui.text,
bg = bg,
blend = blend,
},
SpotlightWinSeparator = {
fg = C.ui.inactive_base,
bg = opts.transparent and C.none or C.ui.inactive_base,
blend = blend,
},
SpotlightNormalNC = {
fg = C.syntax.text,
bg = opts.transparent and C.none or C.ui.inactive_base,
-- blend = blend,
},
}
end

return callback
Loading