-
Notifications
You must be signed in to change notification settings - Fork 4
/
monokai-nightasty.nvim.txt
373 lines (270 loc) · 13.8 KB
/
monokai-nightasty.nvim.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
*monokai-nightasty.nvim.txt* For Neovim >= 0.9 Last change: 2024 July 01
==============================================================================
Table of Contents *monokai-nightasty.nvim-table-of-contents*
1. Description |monokai-nightasty.nvim-description|
2. Features |monokai-nightasty.nvim-features|
3. Requirements |monokai-nightasty.nvim-requirements|
4. Installation |monokai-nightasty.nvim-installation|
5. Usage/Configuration |monokai-nightasty.nvim-usage/configuration|
- Lualine |monokai-nightasty.nvim-lualine|
- Advanced configuration |monokai-nightasty.nvim-advanced-configuration|
6. Colors and Highlights |monokai-nightasty.nvim-colors-and-highlights|
7. Extras |monokai-nightasty.nvim-extras|
- Markdown files |monokai-nightasty.nvim-markdown-files|
- Tmux |monokai-nightasty.nvim-tmux|
- Using with other plugins |monokai-nightasty.nvim-using-with-other-plugins|
8. Color Palettes |monokai-nightasty.nvim-color-palettes|
- Dark Style |monokai-nightasty.nvim-dark-style|
- Light Style |monokai-nightasty.nvim-light-style|
9. Contributions |monokai-nightasty.nvim-contributions|
==============================================================================
1. Description *monokai-nightasty.nvim-description*
A dark/light theme for Neovim based on the Monokai color palette. This theme is
born from a mix between the code of the great tokyonight.nvim
<https://github.com/folke/tokyonight.nvim> and the palette of the flavorful
vim-monokai-tasty <https://github.com/patstockwell/vim-monokai-tasty>.
==============================================================================
2. Features *monokai-nightasty.nvim-features*
- Infused with the Monokai palette for a vibrant, distraction-free coding
experience.
- Avoid eye strain by seamlessly toggling between clear and dark styles at your
fingertips, whether you’re at your station or out in the wild.
- Support for popular plugins like treesitter, cmp, telescope, gitsigns,
lualine, indent-blankline, which-key, notify, noice, todo-comments and more.
- Highly customizable for your coding needs.
==============================================================================
3. Requirements *monokai-nightasty.nvim-requirements*
- Neovim <https://neovim.io/> >= 0.9.0
- nvim-treesitter <https://github.com/nvim-treesitter/nvim-treesitter> > 0.9.2
==============================================================================
4. Installation *monokai-nightasty.nvim-installation*
Install with your package manager.
>lua
-- Lazy
{
"polirritmico/monokai-nightasty.nvim",
lazy = false,
priority = 1000,
}
<
==============================================================================
5. Usage/Configuration *monokai-nightasty.nvim-usage/configuration*
BASIC USAGE ~
No need to use the `setup()` function, just set the `colorscheme`
>lua
vim.opt.background = "dark" -- default to dark or light style
vim.cmd.colorscheme("monokai-nightasty")
<
TOGGLE FUNCTION ~
The Dark/light styles could be toggled by calling the provided function:
>vim
:MonokaiToggleLight
<
In **Lua**
>lua
require("monokai-nightasty").toggle()
<
LUALINE *monokai-nightasty.nvim-lualine*
>lua
require("lualine").setup({
options = { theme = "monokai-nightasty" },
})
<
ADVANCED CONFIGURATION *monokai-nightasty.nvim-advanced-configuration*
Set the configuration **BEFORE** calling `colorscheme monokai-nightasty`.
FULL DEFAULTS: ~
Monokai Nightasty comes with these defaults:
>lua
{
dark_style_background = "default", -- default, dark, transparent, #color
light_style_background = "default", -- default, dark, transparent, #color
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
hl_styles = {
-- Style to be applied to different syntax groups. See `:help nvim_set_hl`
comments = { italic = true },
keywords = { italic = false },
functions = {},
variables = {},
-- Background styles for sidebars (panels) and floating windows:
floats = "default", -- default, dark, transparent
sidebars = "default", -- default, dark, transparent
},
color_headers = false, -- Enable header colors for each header level (h1, h2, etc.)
dim_inactive = false, -- dims inactive windows
hide_inactive_statusline = false, -- Hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
lualine_bold = true, -- Lualine headers will be bold or regular.
lualine_style = "default", -- "dark", "light" or "default" (default follows dark/light style)
markdown_header_marks = false, -- Add headers marks highlights (the `#` character) to Treesitter highlight query
-- Set the colors for terminal-mode. Could be a boolean, a table or a function that returns a table.
-- Could be `true` to enable defaults, a function like `function(colors) return { Normal = { fg = colors.fg_dark } }`
-- or directly a table like `{ Normal = { fg = "#e6e6e6" } }`.
terminal_colors = true,
--- You can override specific color groups to use other groups or a hex color
--- function will be called with the Monokai ColorScheme table
---@param colors ColorScheme
on_colors = function(colors) end,
--- You can override specific highlights to use other groups or a hex color
--- function will be called with the Monokai Highlights and ColorScheme table
---@param highlights Highlights
---@param colors ColorScheme
on_highlights = function(highlights, colors) end,
}
<
FULL CONFIGURATION EXAMPLE (FOR LAZY): ~
>lua
return {
"polirritmico/monokai-nightasty.nvim",
lazy = false,
priority = 1000,
keys = {
{ "<leader>tt", "<Cmd>MonokaiToggleLight<CR>", desc = "Monokai-Nightasty: Toggle dark/light theme." },
},
opts = {
dark_style_background = "transparent", -- default, dark, transparent, #color
light_style_background = "default", -- default, dark, transparent, #color
color_headers = true, -- Enable header colors for each header level (h1, h2, etc.)
lualine_bold = true, -- Lualine a and z sections font width
lualine_style = "default", -- "dark", "light" or "default" (Follows dark/light style)
-- Style to be applied to different syntax groups. See `:help nvim_set_hl`
hl_styles = {
keywords = { italic = true },
comments = { italic = true },
},
-- This also could be a table like this: `terminal_colors = { Normal = { fg = "#e6e6e6" } }`
terminal_colors = function(colors)
return { Normal = { fg = colors.fg_dark } }
end
--- You can override specific color/highlights. Theme color values
--- in `extras/palettes`. Also could be any hex RGB color you like.
on_colors = function(colors)
-- Custom color only for light theme
local current_is_light = vim.o.background == "light"
colors.comment = current_is_light and "#2d7e79" or colors.grey
-- Custom color only for dark theme
colors.border = not current_is_light and colors.magenta or colors.border
-- Custom lualine normal color
colors.lualine.normal_bg = current_is_light and "#7ebd00" or colors.green
end,
on_highlights = function(highlights, colors)
-- You could add styles like bold, underline, italic
highlights.TelescopeSelection = { bold = true }
highlights.TelescopeBorder = { fg = colors.grey }
highlights["@lsp.type.property.lua"] = { fg = colors.fg }
end,
},
config = function(_, opts)
-- Highlight line at the cursor position
vim.opt.cursorline = true
-- Default to dark theme
vim.o.background = "dark" -- dark | light
require("monokai-nightasty").load(opts)
end,
}
<
------------------------------------------------------------------------------
==============================================================================
6. Colors and Highlights *monokai-nightasty.nvim-colors-and-highlights*
How the plugin setup the highlights and colors under the hood:
1. `colors` are loaded from the base palette. The colors of the **light style**
are set in `colors.light_palette`. If `vim.o.background == "light"` is
detected, then the `default` palette is overridden with the light palette
values.
2. Then, `colors` is extended and adjusted following the configuration settings.
3. After that, `config.on_colors(colors)` is called, overriding any matching
color.
4. The highlight groups are set using the generated `colors`.
5. Finally, `config.on_highlights(highlights, colors)` can be used to override
highlight groups.
To get the name of a highlight group or to find the used color, here are some
alternatives:
1. Use `:Inspect` to get info of the highlight group at the current position.
2. Check the generated palettes in the |monokai-nightasty.nvim-extras|.
3. For the theme with the color names instead of the colors code, you could
check directly the `theme.lua` or `colors.lua` files inside the
`lua/monokai-nightasty/` directory.
You could set colors for `light` or `dark` themes using boolean logic:
>lua
on_colors = function(colors)
local is_light = vim.o.background == "light"
colors.comment = is_light and "#2d7e79" or colors.grey
colors.border = not is_light and colors.magenta or colors.border
end,
<
------------------------------------------------------------------------------
==============================================================================
7. Extras *monokai-nightasty.nvim-extras*
Currently this extra files are generated:
- Monokai Nightasty Palettes <https://github.com/polirritmico/monokai-nightasty.nvim/tree/main/extras/palettes> (palettes <extras/palettes>)
- Kitty <https://sw.kovidgoyal.net/kitty/> (kitty <extras/kitty>)
- Lazygit <https://github.com/jesseduffield/lazygit> (lazygit <extras/lazygit>)
- Tmux <https://github.com/tmux/tmux/wiki> (tmux <extras/tmux>)
- Zathura <https://pwmt.org/projects/zathura/> (zathura <extras/zathura>)
The Monokai Nightasty Palette is a file with the used `colors` and
`highlights`.
To use the generated config files with the corresponding external tool, check
the `extras` folder, copy, link or reference the file in each setting. Refer to
the respective program documentation.
MARKDOWN FILES *monokai-nightasty.nvim-markdown-files*
Nvim Tressiter no longer provide highlight captures for the headers `#` marks.
This plugin will provide them for as long as they work, or until
nvim-treesitter provides any way to highlight them.
To enable this feature, set the `markdown_header_marks` option to `true`
(defaults to `false`).
TMUX *monokai-nightasty.nvim-tmux*
Just source the theme file:
>bash
source-file 'path/to/monokai-nightasty_dark.tmux'
<
FIX UNDERCURLS IN TMUX ~
If the undercurls or colors are not being properly displayed within Tmux
<https://github.com/tmux/tmux>, add the following to your config file:
>sh
# Undercurl
set -as terminal-features ",xterm-256color:RGB" # or: set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
<
USING WITH OTHER PLUGINS *monokai-nightasty.nvim-using-with-other-plugins*
You could import the color palette to use with other plugins:
>lua
local colors = require("monokai-nightasty.colors").setup()
some_plugin_config.title = colors.blue_light
example_plugin_config = {
foo = colors.bg_dark,
bar = colors.blue_light,
}
<
Some color utility functions are available for your use:
>lua
local colors = require("monokai-nightasty.colors").setup()
local util = require("monokai-nightasty.util")
some_plugin_config.example = util.lighten(colors.bg, 0.5)
some_plugin_config.another = util.darken(colors.bg, 0.3)
<
==============================================================================
8. Color Palettes *monokai-nightasty.nvim-color-palettes*
DARK STYLE *monokai-nightasty.nvim-dark-style*
Color name Hex code
------------ ----------
Yellow #ffff87
Purple #af87ff
Green #a4e400
Blue #62d8f1
Magenta #fc1a70
Orange #ff9700
LIGHT STYLE *monokai-nightasty.nvim-light-style*
Color name Hex code
------------ ----------
Yellow #ff8f00
Purple #6054d0
Green #4fb000
Blue #00b3e3
Magenta #ff004b
Orange #ff4d00
==============================================================================
9. Contributions *monokai-nightasty.nvim-contributions*
This plugin is made mainly for my personal use, but suggestions, issues, or
pull requests are very welcome.
**Enjoy**
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: