Skip to content

Commit cebee51

Browse files
authored
feat!: complete rewrite. see readme for more details
* two new themes: GYOKURO and HOJICHA, both green tea inspired themes * dark/light variants for all themes * option to favor treesitter highlighting over semantic highlighting * option to change gutter appearance * dropping support for COFFEECAT, DARKFOREST, and DAYLIGHT. See README.
1 parent 8eecbe1 commit cebee51

File tree

107 files changed

+3161
-4196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+3161
-4196
lines changed

README.md

Lines changed: 101 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,71 @@
11
# NEOMODERN.nvim
22

3-
A collection of themes (4 dark, 1 light) written in [Lua](https://www.lua.org) for [Neovim](https://github.com/neovim/neovim) $\geq$ 0.9.
3+
A collection of themes written in [Lua](https://www.lua.org) for [Neovim](https://github.com/neovim/neovim) >= 0.9.
44
Support for [Treesitter](https://github.com/nvim-treesitter/nvim-treesitter) syntax highlighting and LSP semantic highlighting.
5-
Forked from [OneDark.nvim](https://github.com/navarasu/onedark.nvim).
65

76
Themes have been designed to be unintrusive, simple, and pleasing to the eyes.
87

8+
All themes come with a light and dark variant. To use the light variant, set `variant
9+
= "light"` in your config or set `vim.o.background = "light"`.
10+
11+
> [!NOTE]
12+
> Neomodern is now stable, meaning there will be minimal breaking changes in the future.
13+
> With the release of `v1`, support was dropped for COFFEECAT and DARKFOREST.
14+
> See [Legacy Support](#legacy-support) for details.
15+
916
## Gallery
1017

1118
### ICECLIMBER
1219

13-
A dark theme with colors inspired from Nintendo's Ice Climbers characters
20+
A theme with colors inspired from Nintendo's Ice Climbers characters
1421

1522
<details open>
16-
<summary>Click to toggle previews</summary>
23+
<summary>Dark Variant</summary>
1724

18-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/iceclimber.png)
25+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/iceclimber-dark.png)
1926

2027
</details>
2128

22-
### COFFEECAT
29+
<details closed>
30+
<summary>Light Variant</summary>
2331

24-
A dark, brown pastel theme
32+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/iceclimber-light.png)
33+
34+
</details>
35+
36+
### GYOKURO
37+
38+
A fresh green tea inspired theme
2539

2640
<details open>
27-
<summary>Click to toggle previews</summary>
41+
<summary>Dark Variant</summary>
42+
43+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/gyokuro-dark.png)
44+
45+
</details>
46+
47+
<details closed>
48+
<summary>Light Variant</summary>
2849

29-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/coffeecat.png)
50+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/gyokuro-light.png)
3051

3152
</details>
3253

33-
### DARKFOREST
54+
### HOJICHA
3455

35-
A darker, greener take on the classic [Everforest](https://github.com/sainnhe/everforest) theme
56+
A roasted green tea inspired theme
3657

3758
<details open>
38-
<summary>Click to toggle previews</summary>
59+
<summary>Dark Variant</summary>
3960

40-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/darkforest.png)
61+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/hojicha-dark.png)
62+
63+
</details>
64+
65+
<details closed>
66+
<summary>Light Variant</summary>
67+
68+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/hojicha-light.png)
4169

4270
</details>
4371

@@ -46,20 +74,16 @@ A darker, greener take on the classic [Everforest](https://github.com/sainnhe/ev
4674
Inspired by [ThePrimeagen's](https://github.com/ThePrimeagen) use of the [Rosé-Pine](https://github.com/rose-pine/neovim) theme with [tmux](https://github.com/tmux/tmux/wiki) and no color fixing.
4775

4876
<details open>
49-
<summary>Click to toggle previews</summary>
77+
<summary>Dark Variant</summary>
5078

51-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/roseprime.png)
79+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/roseprime-dark.png)
5280

5381
</details>
5482

55-
### DAYLIGHT
56-
57-
A light variant of ICECLIMBER
58-
59-
<details open>
60-
<summary>Click to toggle previews</summary>
83+
<details closed>
84+
<summary>Light Variant</summary>
6185

62-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/daylight.png)
86+
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/roseprime-light.png)
6387

6488
</details>
6589

@@ -82,59 +106,53 @@ Install via your favorite package manager:
82106
},
83107
```
84108

85-
> [!NOTE]
86-
> `require("neomodern").load()` will call `set colorscheme` with your chosen theme.
87-
> If you prefer, you can use `vim.cmd("colorscheme <theme>")` instead. For
88-
> example, to use darkforest: `vim.cmd("colorscheme darkforest")`. Note if you
89-
> use `vim.cmd("colorscheme neomodern")`, `iceclimber` will be used.
90-
91109
## Configuration
92110

93-
There are 5 themes included (4 dark, 1 light).
94-
The light theme is used when `{ style = "daylight" }` is passed to `setup(options)` or when `vim.o.background = "light"`.
111+
There are 4 themes included, each with a light and dark variant.
112+
The light theme is used when `{ variant = "light" }` is passed to `setup(options)` or
113+
when `vim.o.background = "light"`.
95114

96-
Default options are given below
115+
Default options are given below:
97116

98117
```lua
99118
require("neomodern").setup({
100-
-- MAIN OPTIONS --
101-
-- Choose between 'iceclimber', 'coffeecat', 'darkforest', 'roseprime', 'daylight'
119+
-----MAIN OPTIONS-----
120+
--
121+
-- Can be one of: 'iceclimber' | 'gyokuro' | 'hojicha' | 'roseprime'
102122
theme = "iceclimber",
103-
-- Keymap (in normal mode) to toggle between themes in theme list
104-
cycle_theme_key = nil,
105-
cycle_theme_list = { "iceclimber", "coffeecat", "darkforest", "roseprime", "daylight" },
106-
-- Keymap (in normal mode) to toggle between light and dark mode.
107-
-- Recommended to remove `daylight` from `toggle_theme_list` if you are also using
108-
-- `cycle_theme_key` keymap for a more intuitive cycle behavior
109-
toggle_mode_key = nil,
110-
-- Don't set background
111-
transparent = false,
112-
-- If true, enable the terminal
113-
term_colors = true,
114-
-- If true, docstrings will be highlighted like strings, otherwise they will be highlighted
115-
-- like comments. Note, behavior is depending on the language server.
123+
-- Can be one of: 'light' | 'dark', or set via vim.o.background
124+
variant = "dark",
125+
-- Use an alternate, darker bg
126+
alt_bg = false,
127+
-- If true, docstrings will be highlighted like strings, otherwise they will be
128+
-- highlighted like comments. Note, behavior is dependent on the language server.
116129
colored_docstrings = true,
117-
-- If false, brackets will be highlighted similar to the default fg color
118-
colored_brackets = true,
119-
-- Don't set background of floating windows. Recommended for when using floating windows
120-
-- with borders.
121-
plain_float = false,
122-
-- Show the end-of-buffer tildes
123-
show_eob = true,
124-
-- If true, highlights {sign,fold}column the same as cursorline
130+
-- If true, highlights the {sign,fold} column the same as cursorline
125131
cursorline_gutter = true,
126-
-- If true, highlights current line number as an alternate color
127-
alt_culnr_hl = true,
132+
-- If true, highlights the gutter darker than the bg
133+
dark_gutter = false,
128134
-- if true favor treesitter highlights over semantic highlights
129135
favor_treesitter_hl = false,
136+
-- Don't set background of floating windows. Recommended for when using floating
137+
-- windows with borders.
138+
plain_float = false,
139+
-- Show the end-of-buffer character
140+
show_eob = true,
141+
-- If true, enable the vim terminal colors
142+
term_colors = true,
143+
-- Keymap (in normal mode) to toggle between light and dark variants.
144+
-- Does nothing if `theme="daylight"`.
145+
toggle_variant_key = nil,
146+
-- Don't set background
147+
transparent = false,
130148

149+
-----DIAGNOSTICS and CODE STYLE-----
150+
--
131151
diagnostics = {
132152
darker = true, -- Darker colors for diagnostic
133153
undercurl = true, -- Use undercurl for diagnostics
134154
background = true, -- Use background color for virtual text
135155
},
136-
137-
-- CODE FORMATTING --
138156
-- The following table accepts values the same as the `gui` option for normal
139157
-- highlights. For example, `bold`, `italic`, `underline`, `none`.
140158
code_style = {
@@ -149,7 +167,8 @@ require("neomodern").setup({
149167
variables = "none",
150168
},
151169

152-
-- PLUGINS --
170+
-----PLUGINS-----
171+
--
153172
-- The following options allow for more control over some plugin appearances.
154173
plugin = {
155174
lualine = {
@@ -159,78 +178,26 @@ require("neomodern").setup({
159178
-- section/component separators.
160179
plain = false,
161180
},
162-
cmp = {
181+
cmp = { -- works for nvim.cmp and blink.nvim
163182
-- Don't highlight lsp-kind items. Only the current selection will be highlighted.
164183
plain = false,
165-
-- Reverse lsp-kind items' highlights in cmp menu.
184+
-- Reverse lsp-kind items' highlights in blink/cmp menu.
166185
reverse = false,
167186
},
168-
-- Options are 'borderless' or 'bordered'.
169-
telescope = "bordered",
170187
},
171188

172189
-- CUSTOM HIGHLIGHTS --
190+
--
173191
-- Override default colors
174192
colors = {},
175193
-- Override highlight groups
176194
highlights = {},
177195
})
178196
-- Convenience function that simply calls `:colorscheme <theme>` with the theme
179-
-- specified in your config. If not specified, `iceclimber` is used.
197+
-- specified in your config.
180198
require("neomodern").load()
181199
```
182200

183-
### Images for Select Config Opts
184-
185-
<details close>
186-
<summary>Bordered Telescope</summary>
187-
188-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/bordered-tscope.png)
189-
190-
</details>
191-
192-
<details close>
193-
<summary>Borderless Telescope</summary>
194-
195-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/borderless-tscope.png)
196-
197-
</details>
198-
199-
<details close>
200-
<summary>Normal Lualine</summary>
201-
202-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/roseprime.png)
203-
204-
</details>
205-
206-
<details close>
207-
<summary>Plain Lualine</summary>
208-
209-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/plain_lualine.png)
210-
211-
</details>
212-
213-
Example setup for plain cmp (preview below):
214-
215-
```lua
216-
-- Use these opts in setup and also rounded borders enabled in your lsp config
217-
require("neomodern").setup({
218-
plain_float = true,
219-
plugin = {
220-
cmp = {
221-
plain = true,
222-
},
223-
},
224-
})
225-
```
226-
227-
<details close>
228-
<summary>Click to toggle preview for plain cmp</summary>
229-
230-
![image](https://github.com/cdmill/neomodern.nvim/blob/assets/plain_cmp.png)
231-
232-
</details>
233-
234201
## Customization
235202

236203
Example using custom colors and highlights:
@@ -250,9 +217,7 @@ require("neomodern").setup {
250217
}
251218
```
252219

253-
> [!NOTE]
254-
> [Treesitter](https://github.com/nvim-treesitter/nvim-treesitter) keywords have changed for Neovim $\geq$ 0.8.
255-
220+
See `neomodern.palette` for color names.
256221

257222
## Supported Plugins
258223

@@ -278,13 +243,28 @@ Available [here](https://github.com/cdmill/neomodern.nvim/tree/main/extras)
278243
- [Windows Terminal](https://github.com/microsoft/terminal)
279244
- [Iterm2](https://iterm2.com)
280245

246+
## Legacy Support
247+
248+
With the release of `v1`, Neomodern dropped support for the legacy themes COFFEECAT,
249+
DARKFOREST, and DAYLIGHT. If you would still like to use these themes, you can use the
250+
following commit:
251+
252+
```lua
253+
{
254+
"cdmill/neomodern.nvim",
255+
commit = "8eecbe1",
256+
opts = {
257+
-- your settings here
258+
}
259+
}
260+
```
261+
281262
## Contributing
282263

283264
Pull requests are welcome.
284265

285-
If you are wanting to submit a new theme/style, please create a pull request with your new colors in [this file](https://github.com/cdmill/neomodern.nvim/blob/main/lua/neomodern/palette.lua).
286-
287-
If you are wanting support for a plugin, either open an issue or submit a pull request with your highlight additions in [this file](https://github.com/cdmill/neomodern.nvim/blob/main/lua/neomodern/highlights.lua).
266+
If you are wanting support for a plugin, either open an issue or submit a pull request
267+
with your highlight additions in [this file](https://github.com/cdmill/neomodern.nvim/blob/main/lua/neomodern/highlights/plugin.lua).
288268

289269
## Inspiration
290270

colors/coffeecat.lua

Lines changed: 0 additions & 8 deletions
This file was deleted.

colors/darkforest.lua

Lines changed: 0 additions & 8 deletions
This file was deleted.

colors/daylight.lua

Lines changed: 0 additions & 8 deletions
This file was deleted.

colors/gyokuro.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require("neomodern").load("gyokuro")

colors/hojicha.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require("neomodern").load("hojicha")

colors/iceclimber.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
for k in pairs(package.loaded) do
2-
if k:match(".*neomodern.*") then
3-
package.loaded[k] = nil
4-
end
5-
end
6-
7-
require("neomodern").setup({ theme = "iceclimber" })
8-
require("neomodern").colorscheme()
1+
require("neomodern").load("iceclimber")

colors/neomodern-day.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vim.o.background = "light"
2+
require("neomodern").load()

colors/neomodern.lua

Lines changed: 0 additions & 8 deletions
This file was deleted.

colors/roseprime.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
for k in pairs(package.loaded) do
2-
if k:match(".*neomodern.*") then
3-
package.loaded[k] = nil
4-
end
5-
end
6-
7-
require("neomodern").setup({ theme = "roseprime" })
8-
require("neomodern").colorscheme()
1+
require("neomodern").load("roseprime")

0 commit comments

Comments
 (0)