|
1 |
| -local M = {} |
| 1 | +local colors = require("cyberdream.colors").default |
| 2 | +local opts = require("cyberdream.config").options |
2 | 3 |
|
3 |
| -M.get_theme = function() |
4 |
| - local colors = require("cyberdream.colors").default |
5 |
| - local opts = require("cyberdream.config").options |
| 4 | +if opts.theme.variant == "light" then |
| 5 | + colors = require("cyberdream.colors").light |
| 6 | +end |
6 | 7 |
|
7 |
| - if opts.theme.variant == "light" then |
| 8 | +if opts.theme.variant == "auto" then |
| 9 | + if vim.o.background == "light" then |
8 | 10 | colors = require("cyberdream.colors").light
|
9 | 11 | end
|
| 12 | +end |
10 | 13 |
|
11 |
| - if opts.theme.variant == "auto" then |
12 |
| - if vim.o.background == "light" then |
13 |
| - colors = require("cyberdream.colors").light |
14 |
| - end |
15 |
| - end |
16 |
| - |
17 |
| - if opts.transparent then |
18 |
| - colors.bg = "NONE" |
19 |
| - end |
20 |
| - |
21 |
| - local cyberdream = { |
22 |
| - normal = { |
23 |
| - a = { fg = colors.blue, bg = colors.bg }, |
24 |
| - b = { fg = colors.cyan, bg = colors.bg }, |
25 |
| - c = { fg = colors.fg, bg = colors.bg }, |
26 |
| - x = { fg = colors.fg, bg = colors.bg }, |
27 |
| - y = { fg = colors.magenta, bg = colors.bg }, |
28 |
| - z = { fg = colors.grey, bg = colors.bg }, |
29 |
| - }, |
30 |
| - insert = { |
31 |
| - a = { fg = colors.green, bg = colors.bg }, |
32 |
| - z = { fg = colors.grey, bg = colors.bg }, |
33 |
| - }, |
34 |
| - visual = { |
35 |
| - a = { fg = colors.magenta, bg = colors.bg }, |
36 |
| - z = { fg = colors.grey, bg = colors.bg }, |
37 |
| - }, |
38 |
| - terminal = { |
39 |
| - a = { fg = colors.orange, bg = colors.bg }, |
40 |
| - z = { fg = colors.grey, bg = colors.bg }, |
41 |
| - }, |
42 |
| - } |
43 |
| - |
44 |
| - return cyberdream |
| 14 | +if opts.transparent then |
| 15 | + colors.bg = "NONE" |
45 | 16 | end
|
46 | 17 |
|
47 |
| -return M |
| 18 | +local cyberdream = { |
| 19 | + normal = { |
| 20 | + a = { fg = colors.blue, bg = colors.bg }, |
| 21 | + b = { fg = colors.cyan, bg = colors.bg }, |
| 22 | + c = { fg = colors.fg, bg = colors.bg }, |
| 23 | + x = { fg = colors.fg, bg = colors.bg }, |
| 24 | + y = { fg = colors.magenta, bg = colors.bg }, |
| 25 | + z = { fg = colors.grey, bg = colors.bg }, |
| 26 | + }, |
| 27 | + insert = { |
| 28 | + a = { fg = colors.green, bg = colors.bg }, |
| 29 | + z = { fg = colors.grey, bg = colors.bg }, |
| 30 | + }, |
| 31 | + visual = { |
| 32 | + a = { fg = colors.magenta, bg = colors.bg }, |
| 33 | + z = { fg = colors.grey, bg = colors.bg }, |
| 34 | + }, |
| 35 | + terminal = { |
| 36 | + a = { fg = colors.orange, bg = colors.bg }, |
| 37 | + z = { fg = colors.grey, bg = colors.bg }, |
| 38 | + }, |
| 39 | +} |
| 40 | + |
| 41 | +return cyberdream |
0 commit comments