Skip to content

Commit 177af7c

Browse files
committed
clean up
1 parent b18a012 commit 177af7c

File tree

6 files changed

+61
-236
lines changed

6 files changed

+61
-236
lines changed

Diff for: lua/base46/integrations/statusline/default.lua

+18-85
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,29 @@ local get_theme_tb = require("base46").get_theme_tb
33
local colors = get_theme_tb "base_30"
44
local generate_color = require("base46.colors").change_hex_lightness
55

6-
local statusline_bg = (config.ui.transparency or config.base46.transparency) and "NONE" or colors.statusline_bg
6+
local statusline_bg = config.base46.transparency and "NONE" or colors.statusline_bg
77
local light_grey = generate_color(colors.light_grey, 8)
88

99
local M = {
10-
11-
StatusLine = {
12-
bg = statusline_bg,
13-
},
14-
15-
St_gitIcons = {
16-
fg = light_grey,
17-
bg = statusline_bg,
18-
bold = true,
19-
},
20-
21-
St_Lsp = {
22-
fg = colors.nord_blue,
23-
bg = statusline_bg,
24-
},
25-
26-
St_LspMsg = {
27-
fg = colors.green,
28-
bg = statusline_bg,
29-
},
30-
31-
St_EmptySpace = {
32-
fg = colors.grey,
33-
bg = colors.lightbg,
34-
},
35-
36-
St_file = {
37-
bg = colors.lightbg,
38-
fg = colors.white,
39-
},
40-
41-
St_file_sep = {
42-
bg = statusline_bg,
43-
fg = colors.lightbg,
44-
},
45-
46-
St_cwd_icon = {
47-
fg = colors.one_bg,
48-
bg = colors.red,
49-
},
50-
51-
St_cwd_text = {
52-
fg = colors.white,
53-
bg = colors.lightbg,
54-
},
55-
56-
St_cwd_sep = {
57-
fg = colors.red,
58-
bg = statusline_bg,
59-
},
60-
61-
St_pos_sep = {
62-
fg = colors.green,
63-
bg = colors.lightbg,
64-
},
65-
66-
St_pos_icon = {
67-
fg = colors.black,
68-
bg = colors.green,
69-
},
70-
71-
St_pos_text = {
72-
fg = colors.green,
73-
bg = colors.lightbg,
74-
},
10+
StatusLine = { bg = statusline_bg },
11+
St_gitIcons = { fg = light_grey, bg = statusline_bg, bold = true },
12+
St_Lsp = { fg = colors.nord_blue, bg = statusline_bg },
13+
St_LspMsg = { fg = colors.green, bg = statusline_bg },
14+
St_EmptySpace = { fg = colors.grey, bg = colors.lightbg },
15+
St_file = { bg = colors.lightbg, fg = colors.white },
16+
St_file_sep = { bg = statusline_bg, fg = colors.lightbg },
17+
St_cwd_icon = { fg = colors.one_bg, bg = colors.red },
18+
St_cwd_text = { fg = colors.white, bg = colors.lightbg },
19+
St_cwd_sep = { fg = colors.red, bg = statusline_bg },
20+
St_pos_sep = { fg = colors.green, bg = colors.lightbg },
21+
St_pos_icon = { fg = colors.black, bg = colors.green },
22+
St_pos_text = { fg = colors.green, bg = colors.lightbg },
7523

7624
-- lsp highlights
77-
St_lspError = {
78-
fg = colors.red,
79-
bg = statusline_bg,
80-
},
81-
82-
St_lspWarning = {
83-
fg = colors.yellow,
84-
bg = statusline_bg,
85-
},
86-
87-
St_LspHints = {
88-
fg = colors.purple,
89-
bg = statusline_bg,
90-
},
91-
92-
St_LspInfo = {
93-
fg = colors.green,
94-
bg = statusline_bg,
95-
},
25+
St_lspError = { fg = colors.red, bg = statusline_bg },
26+
St_lspWarning = { fg = colors.yellow, bg = statusline_bg },
27+
St_LspHints = { fg = colors.purple, bg = statusline_bg },
28+
St_LspInfo = { fg = colors.green, bg = statusline_bg },
9629
}
9730

9831
local function genModes_hl(modename, col)

Diff for: lua/base46/integrations/statusline/init.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
local theme = require("nvconfig").ui.statusline.theme
1+
local stl = require("nvconfig").ui.statusline
22

3-
if theme == "custom" then
3+
if not stl.enabled then
44
return {}
55
end
66

7-
local theme_module = "base46.integrations.statusline." .. theme
7+
local theme_module = "base46.integrations.statusline." .. stl.theme
88
return require(theme_module)

Diff for: lua/base46/integrations/statusline/minimal.lua

+16-76
Original file line numberDiff line numberDiff line change
@@ -5,68 +5,19 @@ local generate_color = require("base46.colors").change_hex_lightness
55
local light_grey = generate_color(colors.light_grey, 8)
66

77
local M = {
8-
StatusLine = {
9-
bg = "none",
10-
},
11-
12-
St_gitIcons = {
13-
fg = light_grey,
14-
bg = "none",
15-
bold = true,
16-
},
17-
18-
-- LSP
19-
St_lspError = {
20-
fg = colors.red,
21-
bg = "none",
22-
},
23-
24-
St_lspWarning = {
25-
fg = colors.yellow,
26-
bg = "none",
27-
},
28-
29-
St_LspHints = {
30-
fg = colors.purple,
31-
bg = "none",
32-
},
33-
34-
St_LspInfo = {
35-
fg = colors.green,
36-
bg = "none",
37-
},
38-
39-
St_LspMsg = {
40-
fg = colors.green,
41-
},
42-
43-
St_Lsp = {
44-
fg = colors.green,
45-
},
46-
47-
St_EmptySpace = {
48-
fg = colors.black,
49-
bg = "none",
50-
},
51-
52-
St_EmptySpace2 = {
53-
fg = colors.black,
54-
},
55-
56-
St_file = {
57-
fg = colors.white,
58-
bg = "none",
59-
},
60-
61-
St_file_sep = {
62-
fg = colors.black,
63-
bg = "none",
64-
},
65-
66-
St_sep_r = {
67-
fg = colors.one_bg,
68-
bg = "none",
69-
},
8+
StatusLine = { bg = "none" },
9+
St_gitIcons = { fg = light_grey, bg = "none", bold = true },
10+
St_lspError = { fg = colors.red, bg = "none" },
11+
St_lspWarning = { fg = colors.yellow, bg = "none" },
12+
St_LspHints = { fg = colors.purple, bg = "none" },
13+
St_LspInfo = { fg = colors.green, bg = "none" },
14+
St_LspMsg = { fg = colors.green },
15+
St_Lsp = { fg = colors.green },
16+
St_EmptySpace = { fg = colors.black, bg = "none" },
17+
St_EmptySpace2 = { fg = colors.black },
18+
St_file = { fg = colors.white, bg = "none" },
19+
St_file_sep = { fg = colors.black, bg = "none" },
20+
St_sep_r = { fg = colors.one_bg, bg = "none" },
7021
}
7122

7223
local function genModes_hl(modename, col)
@@ -86,20 +37,9 @@ genModes_hl("Command", "green")
8637
genModes_hl("Select", "blue")
8738

8839
local function gen_hl(name, col)
89-
M["St_" .. name .. "_bg"] = {
90-
fg = colors.black,
91-
bg = colors[col],
92-
}
93-
94-
M["St_" .. name .. "_txt"] = {
95-
fg = colors[col],
96-
bg = colors.one_bg,
97-
}
98-
99-
M["St_" .. name .. "_sep"] = {
100-
fg = colors[col],
101-
bg = colors.black,
102-
}
40+
M["St_" .. name .. "_bg"] = { fg = colors.black, bg = colors[col] }
41+
M["St_" .. name .. "_txt"] = { fg = colors[col], bg = colors.one_bg }
42+
M["St_" .. name .. "_sep"] = { fg = colors[col], bg = colors.black }
10343
end
10444

10545
gen_hl("file", "red")

Diff for: lua/base46/integrations/statusline/vscode.lua

+9-22
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
1-
local config = require("nvconfig")
1+
local config = require "nvconfig"
22
local get_theme_tb = require("base46").get_theme_tb
33
local theme_type = get_theme_tb "type"
44
local colors = get_theme_tb "base_30"
5-
local generate_color = require("base46.colors").change_hex_lightness
5+
local lighten = require("base46.colors").change_hex_lightness
66

7-
local statusline_bg = (config.ui.transparency or config.base46.transparency) and "NONE" or colors.statusline_bg
8-
local light_grey = generate_color(colors.light_grey, 8)
7+
local statusline_bg = config.base46.transparency and "NONE" or lighten(colors.statusline_bg, 1)
8+
local light_grey = lighten(colors.light_grey, 8)
99

1010
if theme_type == "light" then
11-
light_grey = generate_color(colors.light_grey, -15)
11+
light_grey = lighten(colors.light_grey, -15)
1212
end
1313

14-
local M = {
15-
StatusLine = {
16-
fg = light_grey,
17-
bg = statusline_bg,
18-
},
19-
20-
St_Mode = {
21-
fg = light_grey,
22-
bg = colors.one_bg2,
23-
},
24-
25-
StText = {
26-
fg = light_grey,
27-
bg = statusline_bg,
28-
},
14+
return {
15+
StatusLine = { fg = light_grey, bg = statusline_bg },
16+
St_Mode = { fg = light_grey, bg = colors.one_bg2 },
17+
StText = { fg = light_grey, bg = statusline_bg },
2918
}
30-
31-
return M

Diff for: lua/base46/integrations/statusline/vscode_colored.lua

+14-49
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,27 @@
1-
local config = require("nvconfig")
1+
local config = require "nvconfig"
22
local get_theme_tb = require("base46").get_theme_tb
33
local theme_type = get_theme_tb "type"
44
local colors = get_theme_tb "base_30"
5-
local generate_color = require("base46.colors").change_hex_lightness
5+
local lighten = require("base46.colors").change_hex_lightness
66

7-
local statusline_bg = (config.ui.transparency or config.base46.transparency) and "NONE" or colors.statusline_bg
8-
local light_grey = generate_color(colors.light_grey, 8)
7+
local statusline_bg = config.base46.transparency and "NONE" or lighten(colors.statusline_bg, 1)
8+
local light_grey = lighten(colors.light_grey, 8)
99

1010
if theme_type == "light" then
11-
light_grey = generate_color(colors.light_grey, -15)
11+
light_grey = lighten(colors.light_grey, -15)
1212
end
1313

1414
local M = {
15-
StatusLine = {
16-
fg = light_grey,
17-
bg = statusline_bg,
18-
},
19-
20-
StText = {
21-
fg = light_grey,
22-
bg = statusline_bg,
23-
},
24-
15+
StatusLine = { fg = light_grey, bg = statusline_bg },
16+
StText = { fg = light_grey, bg = statusline_bg },
2517
-- LSP
26-
St_lspError = {
27-
fg = colors.red,
28-
bg = statusline_bg,
29-
},
30-
31-
St_lspWarning = {
32-
fg = colors.yellow,
33-
bg = statusline_bg,
34-
},
35-
36-
St_LspHints = {
37-
fg = colors.purple,
38-
bg = statusline_bg,
39-
},
40-
41-
St_Lsp = {
42-
fg = colors.green,
43-
bg = statusline_bg,
44-
},
45-
46-
St_LspMsg = {
47-
fg = colors.red,
48-
bg = statusline_bg,
49-
},
50-
51-
St_cwd = {
52-
fg = colors.red,
53-
bg = colors.one_bg3,
54-
},
55-
56-
St_ft = {
57-
fg = colors.blue,
58-
bg = statusline_bg,
59-
},
18+
St_lspError = { fg = colors.red, bg = statusline_bg },
19+
St_lspWarning = { fg = colors.yellow, bg = statusline_bg },
20+
St_LspHints = { fg = colors.purple, bg = statusline_bg },
21+
St_Lsp = { fg = colors.green, bg = statusline_bg },
22+
St_LspMsg = { fg = colors.red, bg = statusline_bg },
23+
St_cwd = { fg = colors.red, bg = colors.one_bg3 },
24+
St_ft = { fg = colors.blue, bg = statusline_bg },
6025
}
6126

6227
local function genModes_hl(modename, col)

Diff for: lua/base46/integrations/tbline.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ local hlgroups_glassy = {
8585
"TbBufOffModified",
8686
}
8787

88-
if config.ui.transparency or config.base46.transparency then
88+
if config.base46.transparency then
8989
for _, val in ipairs(hlgroups_glassy) do
9090
highlights[val].bg = "NONE"
9191
end

0 commit comments

Comments
 (0)