Skip to content

Commit eedbda3

Browse files
feat: add opts for colors highlights & telescope (#6)
* feat: make borderless telescope theme optional * chore: auto-generate vimdoc * feat: add highlight and color override options * docs: add configuring section with example options * chore: auto-generate vimdoc --------- Co-authored-by: scottmckendry <[email protected]>
1 parent 329bac4 commit eedbda3

File tree

4 files changed

+126
-18
lines changed

4 files changed

+126
-18
lines changed

README.md

+46-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ Lazy:
4747
priority = 1000,
4848
config = function()
4949
require("cyberdream").setup({
50-
transparent = true, -- enable transparent background
51-
italic_comments = true, -- italicize comments
52-
hide_fillchars = true, -- replace all fillchars with ' ' for the ultimate clean look
50+
-- Recommended - see "Configuring" below for more config options
51+
transparent = true,
52+
italic_comments = true,
53+
hide_fillchars = true,
54+
borderless_telescope = true,
5355
})
5456
vim.cmd("colorscheme cyberdream") -- set the colorscheme
5557
end,
@@ -73,6 +75,47 @@ Lualine (optional):
7375

7476
See my personal lualine config [here](https://github.com/scottmckendry/Windots/blob/main/nvim/lua/plugins/lualine.lua) for an example.
7577

78+
## ⚙️ Configuring
79+
80+
Below is an example of all the available configuration options:
81+
82+
```lua
83+
require("cyberdream").setup({
84+
-- Enable transparent background
85+
transparent = true, -- Default: false
86+
87+
-- Enable italics comments
88+
italic_comments = true, -- Default: false
89+
90+
-- Replace all fillchars with ' ' for the ultimate clean look
91+
hide_fillchars = true, -- Default: false
92+
93+
-- Modern borderless telescope theme
94+
borderless_telescope = true, -- Default: true
95+
96+
theme = { -- Default: nil
97+
highlights = {
98+
-- Highlight groups to override, adding new groups is also possible
99+
-- See `:help highlight-groups` for a list of highlight groups
100+
101+
-- Example:
102+
Comment = { fg = "#696969", bg = "NONE", italic = true },
103+
104+
-- Complete list can be found in `lua/cyberdream/theme.lua`
105+
},
106+
107+
-- Override a color entirely
108+
colors = {
109+
-- For a list of colors see `lua/cyberdream/colours.lua`
110+
-- Example:
111+
bg = "#000000",
112+
green = "#00ff00",
113+
magenta = "#ff00ff",
114+
},
115+
},
116+
})
117+
```
118+
76119
## 🤝 Contributing
77120

78121
Pull requests are welcome. If a plugin you use is not supported, please open an issue and I'll try to add support for it. If you have any suggestions or feedback, please open an issue.

doc/cyberdream.nvim.txt

+48-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Table of Contents *cyberdream.nvim-table-of-contents*
55

66
- Features |cyberdream.nvim-features|
77
- Installation |cyberdream.nvim-installation|
8+
- Configuring |cyberdream.nvim-configuring|
89
- Contributing |cyberdream.nvim-contributing|
910

1011
A high-contrast, futuristic & vibrant theme for neovim
@@ -35,9 +36,11 @@ Lazy:
3536
priority = 1000,
3637
config = function()
3738
require("cyberdream").setup({
38-
transparent = true, -- enable transparent background
39-
italic_comments = true, -- italicize comments
40-
hide_fillchars = true, -- replace all fillchars with ' ' for the ultimate clean look
39+
-- Recommended - see "Configuring" below for more config options
40+
transparent = true,
41+
italic_comments = true,
42+
hide_fillchars = true,
43+
borderless_telescope = true,
4144
})
4245
vim.cmd("colorscheme cyberdream") -- set the colorscheme
4346
end,
@@ -64,6 +67,48 @@ See my personal lualine config here
6467
for an example.
6568

6669

70+
CONFIGURING *cyberdream.nvim-configuring*
71+
72+
Below is an example of all the available configuration options:
73+
74+
>lua
75+
require("cyberdream").setup({
76+
-- Enable transparent background
77+
transparent = true, -- Default: false
78+
79+
-- Enable italics comments
80+
italic_comments = true, -- Default: false
81+
82+
-- Replace all fillchars with ' ' for the ultimate clean look
83+
hide_fillchars = true, -- Default: false
84+
85+
-- Modern borderless telescope theme
86+
borderless_telescope = true, -- Default: true
87+
88+
theme = { -- Default: nil
89+
highlights = {
90+
-- Highlight groups to override, adding new groups is also possible
91+
-- See `:help highlight-groups` for a list of highlight groups
92+
93+
-- Example:
94+
Comment = { fg = "#696969", bg = "NONE", italic = true },
95+
96+
-- Complete list can be found in `lua/cyberdream/theme.lua`
97+
},
98+
99+
-- Override a color entirely
100+
colors = {
101+
-- For a list of colors see `lua/cyberdream/colours.lua`
102+
-- Example:
103+
bg = "#000000",
104+
green = "#00ff00",
105+
magenta = "#ff00ff",
106+
},
107+
},
108+
})
109+
<
110+
111+
67112
CONTRIBUTING *cyberdream.nvim-contributing*
68113

69114
Pull requests are welcome. If a plugin you use is not supported, please open an

lua/cyberdream/config.lua

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ local default_options = {
55
transparent = false,
66
italic_comments = false,
77
hide_fillchars = false,
8+
borderless_telescope = true,
9+
10+
theme = {
11+
colors = {},
12+
highlights = {},
13+
},
814
}
915

1016
---@type Config

lua/cyberdream/theme.lua

+26-12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ function M.setup()
88
local theme = {}
99
local t = colors.default
1010

11+
-- Override colors with user defined colors
12+
t = vim.tbl_deep_extend("force", t, opts.theme.colors)
13+
1114
if opts.transparent then
1215
t.bg = "NONE"
1316
end
@@ -174,18 +177,11 @@ function M.setup()
174177
AlphaButtons = { fg = t.blue },
175178

176179
-- Telescope
177-
TelescopeBorder = { fg = t.bgAlt, bg = t.bgAlt },
178-
TelescopeNormal = { bg = t.bgAlt },
179-
TelescopePreviewBorder = { fg = t.bgAlt, bg = t.bgAlt },
180-
TelescopePreviewNormal = { bg = t.bgAlt },
181-
TelescopePreviewTitle = { fg = t.bgAlt, bg = t.green },
182-
TelescopePromptBorder = { fg = t.bgAlt, bg = t.bgAlt },
183-
TelescopePromptNormal = { fg = t.fg, bg = t.bgAlt },
184-
TelescopePromptPrefix = { fg = t.red, bg = t.bgAlt },
185-
TelescopePromptTitle = { fg = t.bgAlt, bg = t.red },
186-
TelescopeResultsBorder = { fg = t.bgAlt, bg = t.bgAlt },
187-
TelescopeResultsNormal = { bg = t.bgAlt },
188-
TelescopeResultsTitle = { fg = t.bgAlt, bg = t.bgAlt },
180+
TelescopeBorder = { fg = t.bgHighlight },
181+
TelescopePromptTitle = { fg = t.blue },
182+
TelescopeResultsTitle = { fg = t.cyan },
183+
TelescopePromptPrefix = { fg = t.pink },
184+
TelescopePreviewTitle = { fg = t.magenta },
189185

190186
-- Cmp
191187
CmpDocumentation = { fg = t.grey, bg = t.bg },
@@ -222,6 +218,24 @@ function M.setup()
222218
LazyProgressTodo = { bold = true, fg = t.grey },
223219
}
224220

221+
if opts.borderless_telescope then
222+
theme.highlights.TelescopeBorder = { fg = t.bgAlt, bg = t.bgAlt }
223+
theme.highlights.TelescopeNormal = { bg = t.bgAlt }
224+
theme.highlights.TelescopePreviewBorder = { fg = t.bgAlt, bg = t.bgAlt }
225+
theme.highlights.TelescopePreviewNormal = { bg = t.bgAlt }
226+
theme.highlights.TelescopePreviewTitle = { fg = t.bgAlt, bg = t.green }
227+
theme.highlights.TelescopePromptBorder = { fg = t.bgAlt, bg = t.bgAlt }
228+
theme.highlights.TelescopePromptNormal = { fg = t.fg, bg = t.bgAlt }
229+
theme.highlights.TelescopePromptPrefix = { fg = t.red, bg = t.bgAlt }
230+
theme.highlights.TelescopePromptTitle = { fg = t.bgAlt, bg = t.red }
231+
theme.highlights.TelescopeResultsBorder = { fg = t.bgAlt, bg = t.bgAlt }
232+
theme.highlights.TelescopeResultsNormal = { bg = t.bgAlt }
233+
theme.highlights.TelescopeResultsTitle = { fg = t.bgAlt, bg = t.bgAlt }
234+
end
235+
236+
-- Override highlights with user defined highlights
237+
theme.highlights = vim.tbl_deep_extend("force", theme.highlights, opts.theme.highlights or {})
238+
225239
return theme
226240
end
227241

0 commit comments

Comments
 (0)