forked from nvim-mini/mini.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase16.lua
More file actions
1691 lines (1507 loc) · 78.1 KB
/
base16.lua
File metadata and controls
1691 lines (1507 loc) · 78.1 KB
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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--- *mini.base16* Base16 colorscheme creation
---
--- MIT License Copyright (c) 2021 Evgeni Chasnovski
--- Fast implementation of [chriskempson/base16](https://github.com/chriskempson/base16)
--- color scheme (with Copyright (C) 2012 Chris Kempson) adapted for modern Neovim
--- Lua plugins. Extra features:
--- - Configurable automatic support of cterm colors (see |highlight-cterm|).
--- - Opinionated palette generator based only on background and foreground
--- colors.
---
--- Supported highlight groups:
--- - Built-in Neovim LSP and diagnostic.
---
--- - Plugins (either with explicit definition or by verification that default
--- highlighting works appropriately):
--- - [nvim-mini/mini.nvim](https://github.com/nvim-mini/mini.nvim)
--- - [akinsho/bufferline.nvim](https://github.com/akinsho/bufferline.nvim)
--- - [anuvyklack/hydra.nvim](https://github.com/anuvyklack/hydra.nvim)
--- - [DanilaMihailov/beacon.nvim](https://github.com/DanilaMihailov/beacon.nvim)
--- - [folke/lazy.nvim](https://github.com/folke/lazy.nvim)
--- - [folke/noice.nvim](https://github.com/folke/noice.nvim)
--- - [folke/todo-comments.nvim](https://github.com/folke/todo-comments.nvim)
--- - [folke/trouble.nvim](https://github.com/folke/trouble.nvim)
--- - [folke/which-key.nvim](https://github.com/folke/which-key.nvim)
--- - [ggandor/leap.nvim](https://github.com/ggandor/leap.nvim)
--- - [ggandor/lightspeed.nvim](https://github.com/ggandor/lightspeed.nvim)
--- - [glepnir/dashboard-nvim](https://github.com/glepnir/dashboard-nvim)
--- - [glepnir/lspsaga.nvim](https://github.com/glepnir/lspsaga.nvim)
--- - [HiPhish/rainbow-delimiters.nvim](https://github.com/HiPhish/rainbow-delimiters.nvim)
--- - [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
--- - [justinmk/vim-sneak](https://github.com/justinmk/vim-sneak)
--- - [ibhagwan/fzf-lua](https://github.com/ibhagwan/fzf-lua)
--- - [kevinhwang91/nvim-bqf](https://github.com/kevinhwang91/nvim-bqf)
--- - [kevinhwang91/nvim-ufo](https://github.com/kevinhwang91/nvim-ufo)
--- - [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
--- - [lukas-reineke/indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim)
--- - [MeanderingProgrammer/render-markdown.nvim](https://github.com/MeanderingProgrammer/render-markdown.nvim)
--- - [neoclide/coc.nvim](https://github.com/neoclide/coc.nvim)
--- - [NeogitOrg/neogit](https://github.com/NeogitOrg/neogit)
--- - [nvim-lualine/lualine.nvim](https://github.com/nvim-lualine/lualine.nvim)
--- - [nvim-neo-tree/neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim)
--- - [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
--- - [nvim-tree/nvim-tree.lua](https://github.com/nvim-tree/nvim-tree.lua)
--- - [OXY2DEV/helpview.nvim](https://github.com/OXY2DEV/helpview.nvim)
--- - [OXY2DEV/markview.nvim](https://github.com/OXY2DEV/markview.nvim)
--- - [phaazon/hop.nvim](https://github.com/phaazon/hop.nvim)
--- - [rcarriga/nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui)
--- - [rcarriga/nvim-notify](https://github.com/rcarriga/nvim-notify)
--- - [rlane/pounce.nvim](https://github.com/rlane/pounce.nvim)
--- - [romgrk/barbar.nvim](https://github.com/romgrk/barbar.nvim)
--- - [stevearc/aerial.nvim](https://github.com/stevearc/aerial.nvim)
--- - [williamboman/mason.nvim](https://github.com/williamboman/mason.nvim)
---
--- # Setup ~
---
--- This module needs a setup with `require('mini.base16').setup({})` (replace
--- `{}` with your `config` table). It will create global Lua table
--- `MiniBase16` which you can use for scripting or manually (with
--- `:lua MiniBase16.*`).
---
--- See |MiniBase16.config| for `config` structure and default values.
---
--- This module doesn't have runtime options, so using `vim.b.minibase16_config`
--- will have no effect here.
---
--- Example: >lua
---
--- require('mini.base16').setup({
--- palette = {
--- base00 = '#112641',
--- base01 = '#3a475e',
--- base02 = '#606b81',
--- base03 = '#8691a7',
--- base04 = '#d5dc81',
--- base05 = '#e2e98f',
--- base06 = '#eff69c',
--- base07 = '#fcffaa',
--- base08 = '#ffcfa0',
--- base09 = '#cc7e46',
--- base0A = '#46a436',
--- base0B = '#9ff895',
--- base0C = '#ca6ecf',
--- base0D = '#42f7ff',
--- base0E = '#ffc4ff',
--- base0F = '#00a5c5',
--- },
--- use_cterm = true,
--- plugins = {
--- default = false,
--- ['nvim-mini/mini.nvim'] = true,
--- },
--- })
--- <
--- # Notes ~
---
--- 1. This is used to create some of plugin's color schemes
--- (see |MiniBase16-color-schemes|).
--- 2. Using `setup()` doesn't actually create a |:colorscheme|. It basically
--- creates a coordinated set of |highlight-groups|. To create your own theme:
--- - Put "myscheme.lua" file (name after your chosen theme name) inside
--- any "colors" directory reachable from 'runtimepath' ("colors" inside
--- your Neovim config directory is usually enough).
--- - Inside "myscheme.lua" call `require('mini.base16').setup()` with your
--- palette and only after that set |g:colors_name| to "myscheme".
---@tag MiniBase16
--- # Base16 colorschemes ~
---
--- This module comes with several pre-built color schemes. Each of them is
--- a |mini.base16| theme created with faster version of the following Lua code: >lua
---
--- require('mini.base16').setup({ palette = palette, use_cterm = true })
--- <
--- Activate them as regular |:colorscheme| (for example, `:colorscheme minischeme`).
---
--- ## minischeme ~
--- *minischeme*
---
--- Blue and yellow main colors with high contrast and saturation palette.
--- Palettes are: >lua
---
--- -- For dark 'background':
--- MiniBase16.mini_palette('#112641', '#e2e98f', 75)
---
--- -- For light 'background':
--- MiniBase16.mini_palette('#e2e5ca', '#002a83', 75)
--- <
--- ## minicyan ~
--- *minicyan*
---
--- Cyan and grey main colors with moderate contrast and saturation palette.
--- Palettes are: >lua
---
--- -- For dark 'background':
--- MiniBase16.mini_palette('#0A2A2A', '#D0D0D0', 50)
---
--- -- For light 'background':
--- MiniBase16.mini_palette('#C0D2D2', '#262626', 80)
--- <
---@tag MiniBase16-color-schemes
-- Module definition ==========================================================
local MiniBase16 = {}
local H = {}
--- Module setup
---
--- Setup is done by applying base16 palette to enable colorscheme. Highlight
--- groups make an extended set from original
--- [base16-vim](https://github.com/chriskempson/base16-vim/) plugin. It is a
--- good idea to have `config.palette` respect the original [styling
--- principles](https://github.com/chriskempson/base16/blob/master/styling.md).
---
--- By default only 'gui highlighting' (see |highlight-gui| and
--- |'termguicolors'|) is supported. To support 'cterm highlighting' (see
--- |highlight-cterm|) supply `config.use_cterm` argument in one of the formats:
--- - `true` to auto-generate from `palette` (as closest colors).
--- - Table with similar structure to `palette` but having terminal colors
--- (integers from 0 to 255) instead of hex strings.
---
---@param config table Module config table. See |MiniBase16.config|.
---
---@usage >lua
--- require('mini.base16').setup({}) -- replace {} with your config table
--- -- needs `palette` field present
--- <
MiniBase16.setup = function(config)
-- Export module
_G.MiniBase16 = MiniBase16
-- Setup config
config = H.setup_config(config)
-- Apply config
H.apply_config(config)
end
--- Defaults ~
---@eval return MiniDoc.afterlines_to_code(MiniDoc.current.eval_section)
---@text # Plugin integrations ~
---
--- `config.plugins` defines for which supported plugins highlight groups will
--- be created. Limiting number of integrations slightly decreases startup time.
--- It is a table with boolean (`true`/`false`) values which are applied as follows:
--- - If plugin name (as listed in |mini.base16|) has entry, it is used.
--- - Otherwise `config.plugins.default` is used.
---
--- Example which will load only "mini.nvim" integration: >lua
---
--- require('mini.base16').setup({
--- palette = require('mini.base16').mini_palette('#112641', '#e2e98f', 75),
--- plugins = {
--- default = false,
--- ['nvim-mini/mini.nvim'] = true,
--- }
--- })
--- <
MiniBase16.config = {
-- Table with names from `base00` to `base0F` and values being strings of
-- HEX colors with format "#RRGGBB". NOTE: this should be explicitly
-- supplied in `setup()`.
palette = nil,
-- Whether to support cterm colors. Can be boolean, `nil` (same as
-- `false`), or table with cterm colors. See `setup()` documentation for
-- more information.
use_cterm = nil,
-- Plugin integrations. Use `default = false` to disable all integrations.
-- Also can be set per plugin (see |MiniBase16.config|).
plugins = { default = true },
}
--minidoc_afterlines_end
-- Module functionality =======================================================
--- Create 'mini' palette
---
--- Create base16 palette based on the HEX (string '#RRGGBB') colors of main
--- background and foreground with optional setting of accent chroma (see
--- details).
---
--- # Algorithm design ~
---
--- - Main operating color space is
--- [CIELCh(uv)](https://en.wikipedia.org/wiki/CIELUV#Cylindrical_representation_(CIELCh))
--- which is a cylindrical representation of a perceptually uniform CIELUV
--- color space. It defines color by three values: lightness L (values from 0
--- to 100), chroma (positive values), and hue (circular values from 0 to 360
--- degrees). Useful converting tool: https://www.easyrgb.com/en/convert.php
--- - There are four important lightness values: background, foreground, focus
--- (around the middle of background and foreground, leaning towards
--- foreground), and edge (extreme lightness closest to foreground).
--- - First four colors have the same chroma and hue as `background` but
--- lightness progresses from background towards focus.
--- - Second four colors have the same chroma and hue as `foreground` but
--- lightness progresses from foreground towards edge in such a way that
--- 'base05' color is main foreground color.
--- - The rest eight colors are accent colors which are created in pairs
--- - Each pair has same hue from set of hues 'most different' to
--- background and foreground hues (if respective chorma is positive).
--- - All colors have the same chroma equal to `accent_chroma` (if not
--- provided, chroma of foreground is used, as they will appear next
--- to each other). Note: this means that in case of low foreground
--- chroma, it is a good idea to set `accent_chroma` manually.
--- Values from 30 (low chorma) to 80 (high chroma) are common.
--- - Within pair there is base lightness (equal to foreground
--- lightness) and alternative (equal to focus lightness). Base
--- lightness goes to colors which will be used more frequently in
--- code: base08 (variables), base0B (strings), base0D (functions),
--- base0E (keywords).
--- How exactly accent colors are mapped to base16 palette is a result of
--- trial and error. One rule of thumb was: colors within one hue pair should
--- be more often seen next to each other. This is because it is easier to
--- distinguish them and seems to be more visually appealing. That is why
--- `base0D` and `base0F` have same hues because they usually represent
--- functions and delimiter (brackets included).
---
---@param background string Background HEX color (formatted as `#RRGGBB`).
---@param foreground string Foreground HEX color (formatted as `#RRGGBB`).
---@param accent_chroma number Optional positive number (usually between 0
--- and 100). Default: chroma of foreground color.
---
---@return table Table with base16 palette.
---
---@usage >lua
--- local p = require('mini.base16').mini_palette('#112641', '#e2e98f', 75)
--- require('mini.base16').setup({ palette = p })
--- <
MiniBase16.mini_palette = function(background, foreground, accent_chroma)
H.validate_hex(background, 'background')
H.validate_hex(foreground, 'foreground')
if accent_chroma and not (type(accent_chroma) == 'number' and accent_chroma >= 0) then
error('(mini.base16) `accent_chroma` should be a positive number or `nil`.')
end
local bg, fg = H.hex2lch(background), H.hex2lch(foreground)
accent_chroma = accent_chroma or fg.c
local palette = {}
-- Target lightness values
-- Justification for skewness towards foreground in focus is mainly because
-- it will be paired with foreground lightness and used for text.
local focus_l = 0.4 * bg.l + 0.6 * fg.l
local edge_l = fg.l > 50 and 99 or 1
-- Background colors
local bg_step = (focus_l - bg.l) / 3
palette[1] = { l = bg.l + 0 * bg_step, c = bg.c, h = bg.h }
palette[2] = { l = bg.l + 1 * bg_step, c = bg.c, h = bg.h }
palette[3] = { l = bg.l + 2 * bg_step, c = bg.c, h = bg.h }
palette[4] = { l = bg.l + 3 * bg_step, c = bg.c, h = bg.h }
-- Foreground colors Possible negative value of `palette[5].l` will be
-- handled in future conversion to hex.
local fg_step = (edge_l - fg.l) / 2
palette[5] = { l = fg.l - 1 * fg_step, c = fg.c, h = fg.h }
palette[6] = { l = fg.l + 0 * fg_step, c = fg.c, h = fg.h }
palette[7] = { l = fg.l + 1 * fg_step, c = fg.c, h = fg.h }
palette[8] = { l = fg.l + 2 * fg_step, c = fg.c, h = fg.h }
-- Accent colors
-- Only try to avoid color if it has positive chroma, because with zero
-- chroma hue is meaningless (as in polar coordinates)
local present_hues = {}
if bg.c > 0 then table.insert(present_hues, bg.h) end
if fg.c > 0 then table.insert(present_hues, fg.h) end
local hues = H.make_different_hues(present_hues, 4)
-- stylua: ignore start
palette[9] = { l = fg.l, c = accent_chroma, h = hues[1] }
palette[10] = { l = focus_l, c = accent_chroma, h = hues[1] }
palette[11] = { l = focus_l, c = accent_chroma, h = hues[2] }
palette[12] = { l = fg.l, c = accent_chroma, h = hues[2] }
palette[13] = { l = focus_l, c = accent_chroma, h = hues[4] }
palette[14] = { l = fg.l, c = accent_chroma, h = hues[3] }
palette[15] = { l = fg.l, c = accent_chroma, h = hues[4] }
palette[16] = { l = focus_l, c = accent_chroma, h = hues[3] }
-- stylua: ignore end
-- Convert to base16 palette
local base16_palette = {}
for i, lch in ipairs(palette) do
local name = H.base16_names[i]
-- It is ensured in `lch2hex` that only valid HEX values are produced
base16_palette[name] = H.lch2hex(lch)
end
return base16_palette
end
--- Converts palette with RGB colors to terminal colors
---
--- Useful for caching `use_cterm` variable to increase speed.
---
---@param palette table Table with base16 palette (same as in
--- `MiniBase16.config.palette`).
---
---@return table Table with base16 palette using |highlight-cterm|.
MiniBase16.rgb_palette_to_cterm_palette = function(palette)
H.validate_base16_palette(palette, 'palette')
-- Create cterm palette only when it is needed to decrease load time
H.ensure_cterm_palette()
return vim.tbl_map(function(hex) return H.nearest_rgb_id(H.hex2rgb(hex), H.cterm_palette) end, palette)
end
-- Helper data ================================================================
-- Module default config
H.default_config = vim.deepcopy(MiniBase16.config)
-- Helper functionality =======================================================
-- Settings -------------------------------------------------------------------
H.setup_config = function(config)
H.check_type('config', config, 'table', true)
config = vim.tbl_deep_extend('force', vim.deepcopy(H.default_config), config or {})
-- Validate settings
H.validate_base16_palette(config.palette, 'config.palette')
H.validate_use_cterm(config.use_cterm, 'config.use_cterm')
H.check_type('plugins', config.plugins, 'table')
return config
end
H.apply_config = function(config)
MiniBase16.config = config
H.apply_palette(config.palette, config.use_cterm)
end
-- Validators -----------------------------------------------------------------
H.base16_names = {
'base00',
'base01',
'base02',
'base03',
'base04',
'base05',
'base06',
'base07',
'base08',
'base09',
'base0A',
'base0B',
'base0C',
'base0D',
'base0E',
'base0F',
}
H.validate_base16_palette = function(x, x_name)
if type(x) ~= 'table' then error(string.format('(mini.base16) `%s` is not a table.', x_name)) end
for _, color_name in pairs(H.base16_names) do
local c = x[color_name]
if c == nil then
local msg = string.format('(mini.base16) `%s` does not have value %s.', x_name, color_name)
error(msg)
end
H.validate_hex(c, string.format('%s.%s', x_name, color_name))
end
return true
end
H.validate_use_cterm = function(x, x_name)
if not x or type(x) == 'boolean' then return true end
if type(x) ~= 'table' then
local msg = string.format('(mini.base16) `%s` should be boolean or table with cterm colors.', x_name)
error(msg)
end
for _, color_name in pairs(H.base16_names) do
local c = x[color_name]
if c == nil then
local msg = string.format('(mini.base16) `%s` does not have value %s.', x_name, color_name)
error(msg)
end
if not (type(c) == 'number' and 0 <= c and c <= 255) then
local msg = string.format('(mini.base16) `%s.%s` is not a cterm color.', x_name, color_name)
error(msg)
end
end
return true
end
H.validate_hex = function(x, x_name)
local is_hex = type(x) == 'string' and x:len() == 7 and x:sub(1, 1) == '#' and (tonumber(x:sub(2), 16) ~= nil)
if not is_hex then
local msg = string.format('(mini.base16) `%s` is not a HEX color (string "#RRGGBB").', x_name)
error(msg)
end
return true
end
-- Highlighting ---------------------------------------------------------------
H.apply_palette = function(palette, use_cterm)
-- Prepare highlighting application. Notes:
-- - Clear current highlight only if other theme was loaded previously.
-- - No need to `syntax reset` because *all* syntax groups are defined later.
if vim.g.colors_name then vim.cmd('highlight clear') end
-- As this doesn't create colorscheme, don't store any name. Not doing it
-- might cause some issues with `syntax on`.
vim.g.colors_name = nil
local p, hi
if use_cterm then
p, hi = H.make_compound_palette(palette, use_cterm), H.highlight_both
else
p, hi = palette, H.highlight_gui
end
-- NOTE: recommendations for adding new highlight groups:
-- - Put all related groups (like for new plugin) in single paragraph.
-- - Sort within group alphabetically (by hl-group name) ignoring case.
-- - Link all repeated groups within paragraph (lowers execution time).
-- - Align by commas.
-- stylua: ignore start
-- Builtin highlighting groups. Some groups which are missing in 'base16-vim'
-- are added based on groups to which they are linked.
hi('ColorColumn', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('ComplMatchIns', {fg=nil, bg=nil, attr=nil, sp=nil})
hi('Conceal', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('CurSearch', {fg=p.base01, bg=p.base09, attr=nil, sp=nil})
hi('Cursor', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('CursorColumn', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('CursorIM', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('CursorLine', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineFold', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineNr', {fg=p.base04, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineSign', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('DiffAdd', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
-- Differs from base16-vim, but according to general style guide
hi('DiffChange', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('DiffDelete', {fg=p.base08, bg=p.base01, attr=nil, sp=nil})
hi('DiffText', {fg=p.base0D, bg=p.base01, attr=nil, sp=nil})
hi('DiffTextAdd', {link='DiffAdd'})
hi('Directory', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('EndOfBuffer', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('ErrorMsg', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('FloatBorder', {link='NormalFloat'})
hi('FoldColumn', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('Folded', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('IncSearch', {fg=p.base01, bg=p.base09, attr=nil, sp=nil})
hi('lCursor', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('LineNr', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('LineNrAbove', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('LineNrBelow', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
-- Slight difference from base16, where `bg=base03` is used. This makes
-- it possible to comfortably see this highlighting in comments.
hi('MatchParen', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('ModeMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MoreMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MsgArea', {link='Normal'})
hi('MsgSeparator', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
hi('NonText', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('Normal', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('NormalFloat', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('NormalNC', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('OkMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('Pmenu', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('PmenuExtra', {link='Pmenu'})
hi('PmenuExtraSel', {link='PmenuSel'})
hi('PmenuKind', {link='Pmenu'})
hi('PmenuKindSel', {link='PmenuSel'})
hi('PmenuMatch', {fg=p.base05, bg=nil, attr='bold', sp=nil})
hi('PmenuMatchSel', {fg=p.base05, bg=nil, attr='bold,reverse', sp=nil})
hi('PmenuSbar', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('PmenuSel', {fg=p.base05, bg=p.base01, attr='reverse', sp=nil})
hi('PmenuThumb', {fg=nil, bg=p.base07, attr=nil, sp=nil})
hi('Question', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('QuickFixLine', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('Search', {fg=p.base01, bg=p.base0A, attr=nil, sp=nil})
hi('SignColumn', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('SpecialKey', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('SpellBad', {fg=nil, bg=nil, attr='undercurl', sp=p.base08})
hi('SpellCap', {fg=nil, bg=nil, attr='undercurl', sp=p.base0D})
hi('SpellLocal', {fg=nil, bg=nil, attr='undercurl', sp=p.base0C})
hi('SpellRare', {fg=nil, bg=nil, attr='undercurl', sp=p.base0E})
hi('StatusLine', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('StatusLineNC', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('StderrMsg', {link='ErrorMsg'})
hi('StdoutMsg', {link='MsgArea'})
hi('Substitute', {fg=p.base01, bg=p.base0A, attr=nil, sp=nil})
hi('TabLine', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('TabLineFill', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('TabLineSel', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('TermCursor', {fg=nil, bg=nil, attr='reverse', sp=nil})
hi('TermCursorNC', {fg=nil, bg=nil, attr='reverse', sp=nil})
hi('Title', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('VertSplit', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
hi('Visual', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('VisualNOS', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('WarningMsg', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Whitespace', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('WildMenu', {fg=p.base08, bg=p.base0A, attr=nil, sp=nil})
hi('WinBar', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('WinBarNC', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('WinSeparator', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
-- Standard syntax (affects treesitter)
hi('Boolean', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('Character', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Comment', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('Conditional', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('Constant', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('Debug', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Define', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('Delimiter', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('Error', {fg=p.base00, bg=p.base08, attr=nil, sp=nil})
hi('Exception', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Float', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('Function', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('Identifier', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Ignore', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('Include', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('Keyword', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('Label', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('Macro', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Number', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('Operator', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('PreCondit', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('PreProc', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('Repeat', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('Special', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('SpecialChar', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('SpecialComment', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('Statement', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('StorageClass', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('String', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('Structure', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('Tag', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('Todo', {fg=p.base0A, bg=p.base01, attr=nil, sp=nil})
hi('Type', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('Typedef', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
-- Other from 'base16-vim'
hi('Bold', {fg=nil, bg=nil, attr='bold', sp=nil})
hi('Italic', {fg=nil, bg=nil, attr='italic', sp=nil})
hi('TooLong', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Underlined', {fg=nil, bg=nil, attr='underline', sp=nil})
-- Patch diff
hi('diffAdded', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('diffChanged', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('diffFile', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('diffLine', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('diffRemoved', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Added', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('Changed', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('Removed', {fg=p.base08, bg=nil, attr=nil, sp=nil})
-- Git commit
hi('gitcommitBranch', {fg=p.base09, bg=nil, attr='bold', sp=nil})
hi('gitcommitComment', {link='Comment'})
hi('gitcommitDiscarded', {link='Comment'})
hi('gitcommitDiscardedFile', {fg=p.base08, bg=nil, attr='bold', sp=nil})
hi('gitcommitDiscardedType', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('gitcommitHeader', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('gitcommitOverflow', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('gitcommitSelected', {link='Comment'})
hi('gitcommitSelectedFile', {fg=p.base0B, bg=nil, attr='bold', sp=nil})
hi('gitcommitSelectedType', {link='gitcommitDiscardedType'})
hi('gitcommitSummary', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('gitcommitUnmergedFile', {link='gitcommitDiscardedFile'})
hi('gitcommitUnmergedType', {link='gitcommitDiscardedType'})
hi('gitcommitUntracked', {link='Comment'})
hi('gitcommitUntrackedFile', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
-- Built-in diagnostic
hi('DiagnosticError', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('DiagnosticHint', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('DiagnosticInfo', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('DiagnosticOk', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('DiagnosticWarn', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('DiagnosticFloatingError', {fg=p.base08, bg=p.base01, attr=nil, sp=nil})
hi('DiagnosticFloatingHint', {fg=p.base0D, bg=p.base01, attr=nil, sp=nil})
hi('DiagnosticFloatingInfo', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('DiagnosticFloatingOk', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('DiagnosticFloatingWarn', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('DiagnosticSignError', {link='DiagnosticFloatingError'})
hi('DiagnosticSignHint', {link='DiagnosticFloatingHint'})
hi('DiagnosticSignInfo', {link='DiagnosticFloatingInfo'})
hi('DiagnosticSignOk', {link='DiagnosticFloatingOk'})
hi('DiagnosticSignWarn', {link='DiagnosticFloatingWarn'})
hi('DiagnosticUnderlineError', {fg=nil, bg=nil, attr='underline', sp=p.base08})
hi('DiagnosticUnderlineHint', {fg=nil, bg=nil, attr='underline', sp=p.base0D})
hi('DiagnosticUnderlineInfo', {fg=nil, bg=nil, attr='underline', sp=p.base0C})
hi('DiagnosticUnderlineOk', {fg=nil, bg=nil, attr='underline', sp=p.base0B})
hi('DiagnosticUnderlineWarn', {fg=nil, bg=nil, attr='underline', sp=p.base0E})
-- Built-in LSP
hi('LspReferenceText', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('LspReferenceRead', {link='LspReferenceText'})
hi('LspReferenceWrite', {link='LspReferenceText'})
hi('LspSignatureActiveParameter', {link='LspReferenceText'})
hi('LspCodeLens', {link='Comment'})
hi('LspCodeLensSeparator', {link='Comment'})
-- Built-in snippets
hi('SnippetTabstop', {link='Visual'})
hi('SnippetTabstopActive', {link='SnippetTabstop'})
-- Built-in markdown syntax
hi('markdownH1', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('markdownH2', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('markdownH3', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('markdownH4', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('markdownH5', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('markdownH6', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
-- Tree-sitter
-- Sources:
-- - `:h treesitter-highlight-groups`
-- - https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights
-- Included only those differing from default links
hi('@keyword.return', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('@symbol', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('@variable', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('@text.strong', {fg=nil, bg=nil, attr='bold', sp=nil})
hi('@text.emphasis', {fg=nil, bg=nil, attr='italic', sp=nil})
hi('@text.strike', {fg=nil, bg=nil, attr='strikethrough', sp=nil})
hi('@text.underline', {link='Underlined'})
-- Semantic tokens. Source: `:h lsp-semantic-highlight`.
-- Included only those differing from default links
hi('@lsp.type.variable', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('@lsp.mod.deprecated', {fg=p.base08, bg=nil, attr=nil, sp=nil})
-- New tree-sitter groups
if vim.fn.has('nvim-0.10') == 1 then
-- Source: `:h treesitter-highlight-groups`
-- Included only those differing from default links
hi('@markup.strong', {link='@text.strong'})
hi('@markup.italic', {link='@text.emphasis'})
hi('@markup.strikethrough', {link='@text.strike'})
hi('@markup.underline', {link='@text.underline'})
hi('@markup.heading.1', {link='markdownH1'})
hi('@markup.heading.2', {link='markdownH2'})
hi('@markup.heading.3', {link='markdownH3'})
hi('@markup.heading.4', {link='markdownH4'})
hi('@markup.heading.5', {link='markdownH5'})
hi('@markup.heading.6', {link='markdownH6'})
hi('@string.special.vimdoc', {link='SpecialChar'})
hi('@variable.parameter.vimdoc', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('@markup.heading.4.vimdoc', {link='Title'})
end
-- Plugins
-- nvim-mini/mini.nvim
-- TODO: Remove 'echasnovski/mini.nvim' fallback after September 2026
if H.has_integration('nvim-mini/mini.nvim') or H.has_integration('echasnovski/mini.nvim') then
hi('MiniAnimateCursor', {fg=nil, bg=nil, attr='reverse,nocombine', sp=nil})
hi('MiniAnimateNormalFloat', {link='NormalFloat'})
hi('MiniClueBorder', {link='FloatBorder'})
hi('MiniClueDescGroup', {link='DiagnosticFloatingWarn'})
hi('MiniClueDescSingle', {link='NormalFloat'})
hi('MiniClueNextKey', {link='DiagnosticFloatingHint'})
hi('MiniClueNextKeyWithPostkeys', {link='DiagnosticFloatingError'})
hi('MiniClueSeparator', {link='DiagnosticFloatingInfo'})
hi('MiniClueTitle', {fg=p.base0D, bg=p.base01, attr='bold', sp=nil})
hi('MiniCompletionActiveParameter', {link='LspSignatureActiveParameter'})
hi('MiniCompletionDeprecated', {link='DiagnosticDeprecated'})
hi('MiniCompletionInfoBorderOutdated', {link='DiagnosticFloatingWarn'})
hi('MiniCursorword', {fg=nil, bg=nil, attr='underline', sp=nil})
hi('MiniCursorwordCurrent', {fg=nil, bg=nil, attr='underline', sp=nil})
hi('MiniDepsChangeAdded', {link='diffAdded'})
hi('MiniDepsChangeRemoved', {link='diffRemoved'})
hi('MiniDepsHint', {link='DiagnosticHint'})
hi('MiniDepsInfo', {link='DiagnosticInfo'})
hi('MiniDepsMsgBreaking', {link='DiagnosticWarn'})
hi('MiniDepsPlaceholder', {link='Comment'})
hi('MiniDepsTitle', {link='Title'})
hi('MiniDepsTitleError', {link='DiffDelete'})
hi('MiniDepsTitleSame', {link='DiffText'})
hi('MiniDepsTitleUpdate', {link='DiffAdd'})
hi('MiniDiffSignAdd', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('MiniDiffSignChange', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('MiniDiffSignDelete', {fg=p.base08, bg=p.base01, attr=nil, sp=nil})
hi('MiniDiffOverAdd', {link='DiffAdd'})
hi('MiniDiffOverChange', {link='DiffText'})
hi('MiniDiffOverChangeBuf', {link='MiniDiffOverChange'})
hi('MiniDiffOverContext', {link='DiffChange'})
hi('MiniDiffOverContextBuf', {})
hi('MiniDiffOverDelete', {link='DiffDelete'})
hi('MiniFilesBorder', {link='FloatBorder'})
hi('MiniFilesBorderModified', {link='DiagnosticFloatingWarn'})
hi('MiniFilesCursorLine', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniFilesDirectory', {link='Directory'})
hi('MiniFilesFile', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('MiniFilesNormal', {link='NormalFloat'})
hi('MiniFilesTitle', {fg=p.base0D, bg=p.base01, attr=nil, sp=nil})
hi('MiniFilesTitleFocused', {fg=p.base0D, bg=p.base01, attr='bold', sp=nil})
hi('MiniHipatternsFixme', {fg=p.base00, bg=p.base08, attr='bold', sp=nil})
hi('MiniHipatternsHack', {fg=p.base00, bg=p.base0E, attr='bold', sp=nil})
hi('MiniHipatternsNote', {fg=p.base00, bg=p.base0D, attr='bold', sp=nil})
hi('MiniHipatternsTodo', {fg=p.base00, bg=p.base0C, attr='bold', sp=nil})
hi('MiniIconsAzure', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('MiniIconsBlue', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('MiniIconsCyan', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('MiniIconsGreen', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MiniIconsGrey', {fg=p.base07, bg=nil, attr=nil, sp=nil})
hi('MiniIconsOrange', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('MiniIconsPurple', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('MiniIconsRed', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('MiniIconsYellow', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('MiniIndentscopeSymbol', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('MiniIndentscopeSymbolOff', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('MiniJump', {link='SpellRare'})
hi('MiniJump2dDim', {link='Comment'})
hi('MiniJump2dSpot', {fg=p.base07, bg=p.base01, attr='bold,nocombine', sp=nil})
hi('MiniJump2dSpotAhead', {fg=p.base06, bg=p.base00, attr='nocombine', sp=nil})
hi('MiniJump2dSpotUnique', {link='MiniJump2dSpot'})
hi('MiniMapNormal', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('MiniMapSymbolCount', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('MiniMapSymbolLine', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('MiniMapSymbolView', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('MiniNotifyBorder', {link='FloatBorder'})
hi('MiniNotifyLspProgress', {link='MiniNotifyNormal'})
hi('MiniNotifyNormal', {link='NormalFloat'})
hi('MiniNotifyTitle', {link='FloatTitle'})
hi('MiniOperatorsExchangeFrom', {link='IncSearch'})
hi('MiniPickBorder', {link='FloatBorder'})
hi('MiniPickBorderBusy', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('MiniPickBorderText', {fg=p.base0D, bg=p.base01, attr='bold', sp=nil})
hi('MiniPickCursor', {fg=nil, bg=nil, attr='nocombine', sp=nil, blend=100})
hi('MiniPickIconDirectory', {link='Directory'})
hi('MiniPickIconFile', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('MiniPickHeader', {link='DiagnosticFloatingHint'})
hi('MiniPickMatchCurrent', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniPickMatchMarked', {fg=nil, bg=p.base03, attr=nil, sp=nil})
hi('MiniPickMatchRanges', {link='DiagnosticFloatingHint'})
hi('MiniPickNormal', {link='NormalFloat'})
hi('MiniPickPreviewLine', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniPickPreviewRegion', {link='IncSearch'})
hi('MiniPickPrompt', {link='MiniPickMatchRanges'})
hi('MiniPickPromptCaret' , {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('MiniPickPromptPrefix', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('MiniSnippetsCurrent', {fg=nil, bg=nil, attr='underdouble', sp=p.base0E})
hi('MiniSnippetsCurrentReplace', {fg=nil, bg=nil, attr='underdouble', sp=p.base08})
hi('MiniSnippetsFinal', {fg=nil, bg=nil, attr='underdouble', sp=p.base0B})
hi('MiniSnippetsUnvisited', {fg=nil, bg=nil, attr='underdouble', sp=p.base0D})
hi('MiniSnippetsVisited', {fg=nil, bg=nil, attr='underdouble', sp=p.base0C})
hi('MiniStarterCurrent', {link='MiniStarterItem'})
hi('MiniStarterFooter', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('MiniStarterHeader', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('MiniStarterInactive', {link='Comment'})
hi('MiniStarterItem', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('MiniStarterItemBullet', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('MiniStarterItemPrefix', {fg=p.base08, bg=nil, attr='bold', sp=nil})
hi('MiniStarterSection', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('MiniStarterQuery', {fg=p.base0B, bg=nil, attr='bold', sp=nil})
hi('MiniStatuslineDevinfo', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('MiniStatuslineFileinfo', {link='MiniStatuslineDevinfo'})
hi('MiniStatuslineFilename', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('MiniStatuslineInactive', {link='StatusLineNC'})
hi('MiniStatuslineModeCommand', {fg=p.base00, bg=p.base08, attr='bold', sp=nil})
hi('MiniStatuslineModeInsert', {fg=p.base00, bg=p.base0D, attr='bold', sp=nil})
hi('MiniStatuslineModeNormal', {fg=p.base00, bg=p.base05, attr='bold', sp=nil})
hi('MiniStatuslineModeOther', {fg=p.base00, bg=p.base03, attr='bold', sp=nil})
hi('MiniStatuslineModeReplace', {fg=p.base00, bg=p.base0E, attr='bold', sp=nil})
hi('MiniStatuslineModeVisual', {fg=p.base00, bg=p.base0B, attr='bold', sp=nil})
hi('MiniSurround', {link='IncSearch'})
hi('MiniTablineCurrent', {fg=p.base05, bg=p.base02, attr='bold', sp=nil})
hi('MiniTablineFill', {link='Normal'})
hi('MiniTablineHidden', {fg=p.base04, bg=p.base01, attr=nil, sp=nil})
hi('MiniTablineModifiedCurrent', {fg=p.base02, bg=p.base05, attr='bold', sp=nil})
hi('MiniTablineModifiedHidden', {fg=p.base01, bg=p.base04, attr=nil, sp=nil})
hi('MiniTablineModifiedVisible', {fg=p.base02, bg=p.base04, attr='bold', sp=nil})
hi('MiniTablineTabpagesection', {fg=p.base01, bg=p.base0A, attr='bold', sp=nil})
hi('MiniTablineTrunc', {fg=p.base05, bg=p.base01, attr='bold', sp=nil})
hi('MiniTablineVisible', {fg=p.base05, bg=p.base01, attr='bold', sp=nil})
hi('MiniTestEmphasis', {fg=nil, bg=nil, attr='bold', sp=nil})
hi('MiniTestFail', {fg=p.base08, bg=nil, attr='bold', sp=nil})
hi('MiniTestPass', {fg=p.base0B, bg=nil, attr='bold', sp=nil})
hi('MiniTrailspace', {link='Error'})
end
if H.has_integration('akinsho/bufferline.nvim') then
hi('BufferLineBuffer', {fg=p.base04, bg=nil, attr=nil, sp=nil})
hi('BufferLineBufferSelected', {fg=p.base05, bg=nil, attr='bold', sp=nil})
hi('BufferLineBufferVisible', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('BufferLineCloseButton', {link='BufferLineBackground'})
hi('BufferLineCloseButtonSelected', {link='BufferLineBufferSelected'})
hi('BufferLineCloseButtonVisible', {link='BufferLineBufferVisible'})
hi('BufferLineFill', {link='Normal'})
hi('BufferLineTab', {fg=p.base00, bg=p.base0A, attr=nil, sp=nil})
hi('BufferLineTabSelected', {fg=p.base00, bg=p.base0A, attr='bold', sp=nil})
end
if H.has_integration('anuvyklack/hydra.nvim') then
hi('HydraRed', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('HydraBlue', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('HydraAmaranth', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('HydraTeal', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('HydraPink', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('HydraHint', {link='NormalFloat'})
end
if H.has_integration('DanilaMihailov/beacon.nvim') then
hi('Beacon', {fg=nil, bg=p.base07, attr=nil, sp=nil})
end
if H.has_integration('folke/lazy.nvim') then
hi('LazyButton', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('LazyButtonActive', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('LazyDimmed', {link='Comment'})
hi('LazyH1', {fg=nil, bg=p.base02, attr='bold', sp=nil})
end
if H.has_integration('folke/noice.nvim') then
hi('NoiceCmdlinePopupBorder', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('NoiceConfirmBorder', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
end
-- folke/trouble.nvim
if H.has_integration('folke/trouble.nvim') then
hi('TroubleCount', {fg=p.base0B, bg=nil, attr='bold', sp=nil})
hi('TroubleFoldIcon', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('TroubleIndent', {fg=p.base02, bg=nil, attr=nil, sp=nil})
hi('TroubleLocation', {fg=p.base04, bg=nil, attr=nil, sp=nil})
hi('TroubleSignError', {link='DiagnosticError'})
hi('TroubleSignHint', {link='DiagnosticHint'})
hi('TroubleSignInformation', {link='DiagnosticInfo'})
hi('TroubleSignOther', {link='DiagnosticInfo'})
hi('TroubleSignWarning', {link='DiagnosticWarn'})
hi('TroubleText', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('TroubleTextError', {link='TroubleText'})
hi('TroubleTextHint', {link='TroubleText'})
hi('TroubleTextInformation', {link='TroubleText'})
hi('TroubleTextWarning', {link='TroubleText'})
end
-- folke/todo-comments.nvim
-- Everything works correctly out of the box
if H.has_integration('folke/which-key.nvim') then
hi('WhichKey', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('WhichKeyDesc', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('WhichKeyFloat', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('WhichKeyGroup', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('WhichKeySeparator', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('WhichKeyValue', {fg=p.base03, bg=nil, attr=nil, sp=nil})
end
if H.has_integration('ggandor/leap.nvim') then
hi('LeapMatch', {fg=p.base0E, bg=nil, attr='bold,nocombine,underline', sp=nil})
hi('LeapLabel', {fg=p.base08, bg=nil, attr='bold,nocombine', sp=nil})
hi('LeapLabelSelected', {fg=p.base09, bg=nil, attr='bold,nocombine', sp=nil})
hi('LeapBackdrop', {link='Comment'})
end
if H.has_integration('ggandor/lightspeed.nvim') then
hi('LightspeedLabel', {fg=p.base0E, bg=nil, attr='bold,underline', sp=nil})
hi('LightspeedLabelDistant', {fg=p.base0D, bg=nil, attr='bold,underline', sp=nil})
hi('LightspeedShortcut', {fg=p.base07, bg=nil, attr='bold', sp=nil})
hi('LightspeedMaskedChar', {fg=p.base04, bg=nil, attr=nil, sp=nil})
hi('LightspeedUnlabeledMatch', {fg=p.base05, bg=nil, attr='bold', sp=nil})
hi('LightspeedGreyWash', {link='Comment'})
hi('LightspeedUniqueChar', {link='LightspeedUnlabeledMatch'})
hi('LightspeedOneCharMatch', {link='LightspeedShortcut'})
hi('LightspeedPendingOpArea', {link='IncSearch'})
hi('LightspeedCursor', {link='Cursor'})
end
if H.has_integration('glepnir/dashboard-nvim') then
hi('DashboardCenter', {link='Delimiter'})
hi('DashboardFooter', {link='Title'})
hi('DashboardHeader', {link='Title'})
hi('DashboardShortCut', {link='WarningMsg'})
end
if H.has_integration('glepnir/lspsaga.nvim') then
hi('LspSagaCodeActionBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LspSagaCodeActionContent', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('LspSagaCodeActionTitle', {fg=p.base0D, bg=nil, attr='bold', sp=nil})
hi('Definitions', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('DefinitionsIcon', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('FinderParam', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('FinderVirtText', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('LspSagaAutoPreview', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LspSagaFinderSelection', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
hi('LspSagaLspFinderBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('References', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('ReferencesIcon', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('TargetFileName', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('FinderSpinner', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('FinderSpinnerBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('FinderSpinnerTitle', {link='Title'})
hi('LspSagaDefPreviewBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LspSagaHoverBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LspSagaRenameBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LspSagaDiagnosticBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LspSagaDiagnosticHeader', {link='Title'})
hi('LspSagaDiagnosticSource', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('LspSagaBorderTitle', {link='Title'})
hi('LspSagaSignatureHelpBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('LSOutlinePreviewBorder', {fg=p.base0F, bg=nil, attr=nil, sp=nil})
hi('OutlineDetail', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('OutlineFoldPrefix', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('OutlineIndentEvn', {fg=p.base04, bg=nil, attr=nil, sp=nil})
hi('OutlineIndentOdd', {fg=p.base05, bg=nil, attr=nil, sp=nil})
end
if H.has_integration('HiPhish/rainbow-delimiters.nvim') then
hi('RainbowDelimiterBlue', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('RainbowDelimiterCyan', {fg=p.base0C, bg=nil, attr=nil, sp=nil})
hi('RainbowDelimiterGreen', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('RainbowDelimiterOrange', {fg=p.base09, bg=nil, attr=nil, sp=nil})
hi('RainbowDelimiterRed', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('RainbowDelimiterViolet', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('RainbowDelimiterYellow', {fg=p.base0A, bg=nil, attr=nil, sp=nil})
end