Skip to content

Commit 72055d1

Browse files
A-Lamiamehalter
authored andcommitted
fix: inactive window colors work as expected
1 parent 791dad8 commit 72055d1

File tree

5 files changed

+58
-33
lines changed

5 files changed

+58
-33
lines changed

lua/astrotheme/groups/base.lua

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
local function callback(opts)
22
return {
3-
Normal = { fg = C.syntax.text, bg = C.ui.base },
4-
NormalNC = { fg = C.syntax.text, bg = opts.inactive and C.ui.tabline or C.ui.base },
5-
Title = { fg = C.syntax.cyan, bg = C.none },
3+
Normal = { fg = C.syntax.text, bg = opts.transparent and C.none or C.ui.base },
4+
NormalFloat = {
5+
fg = C.ui.text,
6+
bg = opts.inactive and C.ui.base or C.ui.float,
7+
},
8+
NormalNC = {
9+
fg = C.syntax.text,
10+
bg = (opts.transparent and opts.inactive and C.ui.inactive_base)
11+
or (opts.transparent and C.none)
12+
or (opts.inactive and C.ui.inactive_base)
13+
or C.ui.base,
14+
},
15+
Title = { fg = C.ui.title, bg = C.none },
616
Cursor = { fg = C.ui.base, bg = C.syntax.text },
717
CursorIM = { link = "Cursor" },
818
lCursor = { link = "Cursor" },
@@ -11,7 +21,7 @@ local function callback(opts)
1121
Conceal = { fg = C.syntax.subtext1, bg = C.none },
1222
CursorColumn = { fg = C.none, bg = C.ui.current_line },
1323
CursorLine = { fg = C.none, bg = C.ui.current_line },
14-
Directory = { fg = C.syntax.blue, bg = C.none },
24+
Directory = { fg = C.ui.blue, bg = C.none },
1525
DiffAdd = { fg = C.ui.base, bg = C.syntax.green },
1626
DiffChange = { fg = C.ui.base, bg = C.syntax.yellow },
1727
DiffDelete = { fg = C.ui.base, bg = C.syntax.red },
@@ -25,7 +35,7 @@ local function callback(opts)
2535
DiffLine = { fg = C.syntax.text }, -- NOTE: Find better color
2636
DiffIndexLine = { fg = C.syntax.cyan },
2737
ErrorMsg = { fg = C.syntax.red, bg = C.none },
28-
WinSeparator = { fg = C.ui.split, bg = C.none, bold = true },
38+
WinSeparator = { fg = C.ui.split, bg = opts.transparent and C.none or C.ui.base, bold = false },
2939
Folded = { fg = C.syntax.subtext1, bg = C.none },
3040
FoldColumn = { fg = C.none, bg = C.none },
3141
IncSearch = { fg = C.ui.base, bg = C.ui.purple },
@@ -57,18 +67,26 @@ local function callback(opts)
5767
StatusCommand = { fg = C.ui.tabline, bg = C.ui.yellow },
5868
StatusTerminal = { link = "StatusInsert" },
5969
WinBar = { fg = C.syntax.subtext0, bg = C.none },
60-
WinBarNC = { fg = C.syntax.subtext1, bg = opts.inactive and C.ui.tabline or C.none },
70+
WinBarNC = {
71+
fg = C.syntax.subtext1,
72+
bg = (opts.transparent and opts.inactive and C.ui.inactive_base)
73+
or (opts.transparent and C.none)
74+
or (opts.inactive and C.ui.inactive_base)
75+
or C.ui.base,
76+
},
6177
TabLine = { fg = C.syntax.subtext1, bg = C.ui.tabline },
6278
TabLineSel = { fg = C.syntax.text, bg = C.ui.base, bold = true },
6379
TabLineFill = { fg = C.none, bg = C.ui.tabline },
6480
Terminal = { fg = C.syntax.text, bg = C.ui.base },
6581
Visual = { fg = C.none, bg = C.ui.selection },
6682
VisualNOS = { fg = C.ui.selection, bg = C.none },
67-
VirtSplit = { bg = C.ui.base },
83+
VertSplit = { fg = C.ui.split, bg = opts.transparent and C.none or C.ui.base },
6884
WarningMsg = { fg = C.syntax.yellow, bg = C.none },
6985
WildMenu = { fg = C.ui.base, bg = C.syntax.blue },
7086
EndOfBuffer = { fg = C.ui.base, bg = C.none },
87+
FloatTitle = { fg = C.ui.title },
7188
FloatBorder = { fg = C.ui.border, bg = C.ui.base },
89+
Float = { fg = C.ui.border, bg = C.ui.base },
7290
MatchParen = { fg = C.none, bg = C.ui.highlight },
7391
}
7492
end

lua/astrotheme/groups/plugins/neo-tree.lua

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
local function callback(opts)
22
return {
3-
NeoTreeDirectoryIcon = { fg = C.syntax.blue },
3+
NeoTreeDirectoryIcon = { fg = C.ui.blue },
44
NeoTreeRootName = { fg = C.syntax.text, bold = true },
55
NeoTreeFileName = { fg = C.syntax.text },
66
NeoTreeFileIcon = { fg = C.syntax.text },
7-
NeoTreeFileNameOpened = { fg = C.syntax.green },
7+
NeoTreeFileNameOpened = { fg = C.ui.green },
8+
NeoTreeFloatBorder = { fg = C.ui.border },
9+
NeoTreeFloatTitle = { fg = C.ui.title, bg = C.ui.tool },
810
NeoTreeIndentMarker = { fg = C.ui.blue },
9-
NeoTreeGitAdded = { fg = C.syntax.green },
10-
NeoTreeGitConflict = { fg = C.syntax.red },
11-
NeoTreeGitModified = { fg = C.syntax.orange },
12-
NeoTreeGitUntracked = { fg = C.syntax.yellow },
13-
NeoTreeTitleBar = { fg = C.syntax.text, bg = C.ui.tool },
14-
NeoTreeNormal = { fg = C.syntax.text, bg = opts.transparent and C.none or C.ui.tool },
11+
NeoTreeGitAdded = { fg = C.ui.green },
12+
NeoTreeGitConflict = { fg = C.ui.red },
13+
NeoTreeGitModified = { fg = C.ui.orange },
14+
NeoTreeGitUntracked = { fg = C.ui.yellow },
15+
NeoTreeTitleBar = { fg = C.ui.tool, bg = C.ui.border },
16+
NeoTreeNormal = {
17+
fg = C.syntax.text,
18+
bg = (opts.neotree and C.ui.tool) or (opts.transparent and C.none) or C.ui.base,
19+
},
1520
NeoTreeNormalNC = {
1621
fg = C.syntax.text,
17-
bg = (opts.transparent and opts.inactive and C.ui.base)
18-
or (opts.inactive and C.ui.base)
19-
or (opts.transparent and C.none)
20-
or C.ui.tool,
22+
bg = (opts.transparent and C.none) or C.ui.tool,
2123
},
2224
NeoTreeSymbolicLinkTarget = { fg = C.syntax.cyan },
23-
NeoTreeTabActive = { fg = C.syntax.text, bg = C.ui.tool, bold = true },
25+
NeoTreeTabActive = {
26+
fg = C.syntax.text,
27+
bg = opts.transparent and C.none or C.ui.tool,
28+
bold = true,
29+
},
2430
NeoTreeTabInactive = { fg = C.syntax.subtext1, bg = C.ui.tabline },
2531
NeoTreeTabSeparatorActive = { fg = C.ui.tool, bg = C.ui.tool },
2632
NeoTreeTabSeparatorInactive = { fg = C.ui.tabline, bg = C.ui.tabline },
27-
NeoTreeVertSplit = { fg = C.ui.base, bg = C.ui.tool },
28-
NeoTreeStatusLineNC = { fg = C.ui.tool, bg = C.ui.tabline },
33+
NeoTreeVertSplit = { fg = C.ui.split, bg = opts.transparent and C.none or C.ui.base },
34+
NeoTreeWinSeparator = { fg = C.ui.split, bg = opts.transparent and C.none or C.ui.base, bold = true },
35+
NeoTreeStatusLineNC = { fg = C.ui.text, bg = C.ui.statusline },
2936
}
3037
end
3138

lua/astrotheme/groups/plugins/telescope.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
local function callback(opts)
1+
local function callback()
22
return {
33
----------------
44
--- Title
55
----------------
6-
TelescopeResultsTitle = { fg = C.ui.cyan },
7-
TelescopePromptTitle = { fg = C.ui.cyan },
8-
TelescopePreviewTitle = { fg = C.ui.cyan },
6+
TelescopeResultsTitle = { fg = C.ui.title },
7+
TelescopePromptTitle = { fg = C.ui.title },
8+
TelescopePreviewTitle = { fg = C.ui.title },
99

1010
----------------
1111
--- Border
@@ -20,10 +20,10 @@ local function callback(opts)
2020
TelescopeMultiSelection = { fg = C.syntax.blue },
2121
TelescopeMultiIcon = { fg = C.syntax.blue },
2222

23-
TelescopeNormal = { fg = C.syntax.text, bg = opts.floating and C.ui.popup or C.ui.base },
24-
TelescopePreviewNormal = { fg = C.syntax.text, bg = opts.floating and C.ui.popup or C.ui.base },
25-
TelescopePromptNormal = { fg = C.syntax.text, bg = opts.floating and C.ui.popup or C.ui.base },
26-
TelescopeResultsNormal = { fg = C.syntax.text, bg = opts.floating and C.ui.popup or C.ui.base },
23+
TelescopeNormal = { link = "NormalFloat" },
24+
TelescopePreviewNormal = { link = "NormalFloat" },
25+
TelescopePromptNormal = { link = "NormalFloat" },
26+
TelescopeResultsNormal = { link = "NormalFloat" },
2727

2828
TelescopeBorder = { fg = C.ui.border },
2929
TelescopeTitle = { fg = C.syntax.text },
@@ -59,7 +59,7 @@ local function callback(opts)
5959
TelescopeResultsLineNr = { fg = C.syntax.subtext1 },
6060
TelescopeResultsIdentifier = { fg = C.syntax.blue },
6161
TelescopeResultsNumber = { fg = C.syntax.orange },
62-
TelescopeResultsComment = { fg = C.syntax.subtext0 },
62+
TelescopeResultsComment = { fg = C.syntax.comment },
6363
TelescopeResultsSpecialComment = { fg = C.syntax.subtext1 },
6464
TelescopeResultsDiffChange = { fg = C.none, bg = C.syntax.yellow },
6565
TelescopeResultsDiffAdd = { fg = C.none, bg = C.syntax.green },

lua/astrotheme/groups/plugins/which-key.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
local function callback(opts)
22
return {
33
WhichKey = { fg = C.syntax.cyan },
4-
WhichKeyFloat = { bg = opts.floating and C.ui.tool or C.ui.base },
4+
WhichKeyFloat = { bg = opts.popup and C.ui.popup or C.ui.base },
55
WhichKeyBorder = { fg = C.none },
66
WhichKeySeperator = { fg = C.syntax.subtext1 },
77
WhichKeyDesc = { fg = C.syntax.purple },

lua/astrotheme/groups/syntax.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
local function callback()
1212
return {
1313
-- Comment
14-
Comment = { fg = C.syntax.subtext0, bg = C.none }, -- any comment
14+
Comment = { fg = C.syntax.comment, bg = C.none }, -- any comment
1515
-- Constant
1616
Constant = { fg = C.syntax.yellow, bg = C.none }, -- any constant
1717
String = { fg = C.syntax.green, bg = C.none }, -- a string constant: "this is a string"

0 commit comments

Comments
 (0)