/
catppuccin.txt
899 lines (711 loc) · 23.1 KB
/
catppuccin.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
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
*catppuccin.txt* Soothing pastel theme for NeoVim
==============================================================================
Table of Contents *catppuccin-table-of-contents*
1. Features |catppuccin-features|
2. Installation |catppuccin-installation|
3. Usage |catppuccin-usage|
4. Configuration |catppuccin-configuration|
5. Customize highlights |catppuccin-customize-highlights|
- Get catppuccin colors|catppuccin-customize-highlights-get-catppuccin-colors|
- Overwriting colors |catppuccin-customize-highlights-overwriting-colors|
- Overwriting highlight groups|catppuccin-customize-highlights-overwriting-highlight-groups|
6. Integrations |catppuccin-integrations|
7. Compile |catppuccin-compile|
8. FAQ |catppuccin-faq|
- Wrong treesitter highlights |catppuccin-faq-wrong-treesitter-highlights|
- Colors doesn’t match preview screenshots|catppuccin-faq-colors-doesn’t-match-preview-screenshots|
9. Thanks to |catppuccin-thanks-to|
==============================================================================
1. Features *catppuccin-features*
- Supports both vim and neovim (Requires neovim <https://github.com/neovim/neovim/> >= 0.8 or vim <https://github.com/vim/vim> >= 9 compiled with lua <https://github.com/lua/lua> >= 5.1)
- Highly configurable with 4 different flavours and ability to create your own! <https://github.com/catppuccin/nvim/discussions/323>
- Compile <https://github.com/catppuccin/nvim#Compile> user config for fastest startuptime <https://www.reddit.com/r/neovim/comments/xxfpt3/catppuccinnvim_now_startup_in_1ms/>
- Integrations with lsp, treesitter and a bunch of plugins <https://github.com/catppuccin/nvim#integrations>
- Supports for many other applications <https://github.com/catppuccin/catppuccin>
==============================================================================
2. Installation *catppuccin-installation*
lazy.nvim <https://github.com/folke/lazy.nvim>
>lua
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 }
<
packer.nvim <https://github.com/wbthomason/packer.nvim>
>lua
use { "catppuccin/nvim", as = "catppuccin" }
<
vim-plug <https://github.com/junegunn/vim-plug>
>vim
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
<
==============================================================================
3. Usage *catppuccin-usage*
>vim
colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
<
>lua
vim.cmd.colorscheme "catppuccin"
<
==============================================================================
4. Configuration *catppuccin-configuration*
There is no need to call `setup` if you don’t want to change the default
options and settings.
>lua
require("catppuccin").setup({
flavour = "mocha", -- latte, frappe, macchiato, mocha
-- flavour = "auto" -- will respect terminal's background
background = { -- :h background
light = "latte",
dark = "mocha",
},
transparent_background = false, -- disables setting the background color.
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
dim_inactive = {
enabled = false, -- dims the background color of inactive window
shade = "dark",
percentage = 0.15, -- percentage of the shade to apply to the inactive window
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
comments = { "italic" }, -- Change the style of comments
conditionals = { "italic" },
loops = {},
functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
-- miscs = {}, -- Uncomment to turn off hard-coded styles
},
color_overrides = {},
custom_highlights = {},
default_integrations = true,
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = true,
indentscope_color = "",
},
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
},
})
-- setup must be called before loading
vim.cmd.colorscheme "catppuccin"
<
==============================================================================
5. Customize highlights *catppuccin-customize-highlights*
GET CATPPUCCIN COLORS *catppuccin-customize-highlights-get-catppuccin-colors*
>lua
local latte = require("catppuccin.palettes").get_palette "latte"
local frappe = require("catppuccin.palettes").get_palette "frappe"
local macchiato = require("catppuccin.palettes").get_palette "macchiato"
local mocha = require("catppuccin.palettes").get_palette "mocha"
<
Returns a table where the key is the name of the color and the value is its hex
value corresponding to each flavour.
OVERWRITING COLORS *catppuccin-customize-highlights-overwriting-colors*
Colors can be overwritten using `color_overrides` in the setting, checkout
https://github.com/catppuccin/nvim/discussions/323 for inspirations:
>lua
require("catppuccin").setup {
color_overrides = {
all = {
text = "#ffffff",
},
latte = {
base = "#ff0000",
mantle = "#242424",
crust = "#474747",
},
frappe = {},
macchiato = {},
mocha = {},
}
}
<
[!Note] For more information check out our style-guide
<https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md>
OVERWRITING HIGHLIGHT GROUPS*catppuccin-customize-highlights-overwriting-highlight-groups*
Global highlight groups can be overwritten in the setting, for example:
>lua
require("catppuccin").setup {
custom_highlights = function(colors)
return {
Comment = { fg = colors.flamingo },
TabLineSel = { bg = colors.pink },
CmpBorder = { fg = colors.surface2 },
Pmenu = { bg = colors.none },
}
end
}
<
Per flavour highlight groups can also be overwritten in the setting, for
example:
>lua
require("catppuccin").setup {
highlight_overrides = {
all = function(colors)
return {
NvimTreeNormal = { fg = colors.none },
CmpBorder = { fg = "#3e4145" },
}
end,
latte = function(latte)
return {
Normal = { fg = latte.base },
}
end,
frappe = function(frappe)
return {
["@comment"] = { fg = frappe.surface2, style = { "italic" } },
}
end,
macchiato = function(macchiato)
return {
LineNr = { fg = macchiato.overlay1 },
}
end,
mocha = function(mocha)
return {
Comment = { fg = mocha.flamingo },
}
end,
},
}
<
==============================================================================
6. Integrations *catppuccin-integrations*
Catppuccin provides theme support for other plugins in the Neovim ecosystem and
extended Neovim functionality through _integrations_.
To enable/disable an integration you just need to set it to true/false, for
example:
>lua
require("catppuccin").setup({
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = true,
indentscope_color = "",
},
}
})
<
Some integrations are enabled by default, you can control this behaviour with
`default_integrations` option.
>lua
require("catppuccin").setup({
default_integrations = false,
})
<
Below is a list of supported plugins and their corresponding integration
module.
[!Important] If you’d like to know which highlight groups are being affected
by catppuccin, check out this directory: `lua/catppuccin/groups/integrations/`
<https://github.com/catppuccin/nvim/tree/main/lua/catppuccin/groups/integrations>.
PluginDefaultaerial.nvim>lua
aerial = false
<
alpha-nvim>lua
alpha = true
<
barbar.nvim>lua
barbar = false
<
barbecue.nvim>lua
barbecue = {
dim_dirname = true, -- directory name is dimmed by default
bold_basename = true,
dim_context = false,
alt_background = false,
},
<
Special ~
Use this to set it up:
>lua
require("barbecue").setup {
theme = "catppuccin", -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
}
<
beacon.nvim>lua
beacon = false
<
bufferline.nvimSpecial ~
Update your bufferline config to use the Catppuccin components:
[!NOTE] bufferline needs to be loaded after setting up catppuccin or it will
highlight incorrectly
>lua
use "akinsho/bufferline.nvim" {
after = "catppuccin",
config = function()
require("bufferline").setup {
highlights = require("catppuccin.groups.integrations.bufferline").get()
}
end
}
<
Configurations are self-explanatory, see |bufferline-highlights| for detailed
explanations:
>lua
local mocha = require("catppuccin.palettes").get_palette "mocha"
bufferline.setup {
highlights = require("catppuccin.groups.integrations.bufferline").get {
styles = { "italic", "bold" },
custom = {
all = {
fill = { bg = "#000000" },
},
mocha = {
background = { fg = mocha.text },
},
latte = {
background = { fg = "#000000" },
},
},
},
}
<
coc.nvim>lua
coc_nvim = false
<
Special ~
Setting `enabled` to `true` enables this integration.
>lua
coc_nvim = true,
<
[!Note] coc.nvim by default link to native lsp highlight groups so config from
`native_lsp` will also apply to coc
In the inners tables you can set the style for the diagnostics, both
`virtual_text` (what you see on the side) and `underlines` (what points
directly at the thing (e.g. an error)).
>lua
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
<
dashboard-nvim>lua
dashboard = true
<
dropbar.nvim>lua
dropbar = {
enabled = false,
color_mode = false, -- enable color for kind's texts, not just kind's icons
},
<
feline.nvimSpecial ~
Update your Feline config to use the Catppuccin components:
>lua
local ctp_feline = require('catppuccin.groups.integrations.feline')
ctp_feline.setup()
require("feline").setup({
components = ctp_feline.get(),
})
<
Notice that calling `setup()` is optional. You may pass a lua table in order to
change assets, settings and the colors per vim mode.
Here are the defaults:
>lua
local clrs = require("catppuccin.palettes").get_palette()
local ctp_feline = require('catppuccin.groups.integrations.feline')
local U = require "catppuccin.utils.colors"
ctp_feline.setup({
assets = {
left_separator = "",
right_separator = "",
mode_icon = "",
dir = "",
file = "",
lsp = {
server = "",
error = "",
warning = "",
info = "",
hint = "",
},
git = {
branch = "",
added = "",
changed = "",
removed = "",
},
},
sett = {
text = U.vary_color({ latte = latte.base }, clrs.surface0),
bkg = U.vary_color({ latte = latte.crust }, clrs.surface0),
diffs = clrs.mauve,
extras = clrs.overlay1,
curr_file = clrs.maroon,
curr_dir = clrs.flamingo,
show_modified = true -- show if the file has been modified
},
mode_colors = {
["n"] = { "NORMAL", clrs.lavender },
["no"] = { "N-PENDING", clrs.lavender },
["i"] = { "INSERT", clrs.green },
["ic"] = { "INSERT", clrs.green },
["t"] = { "TERMINAL", clrs.green },
["v"] = { "VISUAL", clrs.flamingo },
["V"] = { "V-LINE", clrs.flamingo },
[""] = { "V-BLOCK", clrs.flamingo },
["R"] = { "REPLACE", clrs.maroon },
["Rv"] = { "V-REPLACE", clrs.maroon },
["s"] = { "SELECT", clrs.maroon },
["S"] = { "S-LINE", clrs.maroon },
[""] = { "S-BLOCK", clrs.maroon },
["c"] = { "COMMAND", clrs.peach },
["cv"] = { "COMMAND", clrs.peach },
["ce"] = { "COMMAND", clrs.peach },
["r"] = { "PROMPT", clrs.teal },
["rm"] = { "MORE", clrs.teal },
["r?"] = { "CONFIRM", clrs.mauve },
["!"] = { "SHELL", clrs.green },
}
})
<
[!Warning] Currently feline doesn’t officially support custom themes
<https://github.com/feline-nvim/feline.nvim/issues/302>. In order for
`:colorscheme catppuccin-<flavour>` to work you could add this autocmd as a
workaround:
>lua
vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "*",
callback = function()
package.loaded["feline"] = nil
package.loaded["catppuccin.groups.integrations.feline"] = nil
require("feline").setup {
components = require("catppuccin.groups.integrations.feline").get(),
}
end,
})
<
fern.vim>lua
fern = false
<
fidget.nvim>lua
fidget = false
<
Special ~
Set `notification.window.winblend` to `0`:
>lua
require("fidget").setup {
notification = {
window = {
winblend = 0,
},
}
-- ... the rest of your fidget config
}
<
flash.nvim>lua
flash = true
<
gitsigns.nvim>lua
gitsigns = true
<
harpoon>lua
harpoon = false
<
headlines.nvim>lua
headlines = false
<
hop.nvim>lua
hop = false
<
indent-blankline.nvim>lua
indent_blankline = {
enabled = true,
scope_color = "", -- catppuccin color (eg. `lavender`) Default: text
colored_indent_levels = false,
},
<
Special ~
`colored_indent_levels` enables char highlights per indent level. Follow the
instructions here
<https://github.com/lukas-reineke/indent-blankline.nvim#multiple-indent-colors>
to set the latter up.
leap.nvim>lua
leap = false
<
lightline.vimSpecial ~
>vim
let g:lightline = {'colorscheme': 'catppuccin'}
<
lightspeed.nvim>lua
lightspeed = false
<
lspsaga.nvim>lua
lsp_saga = false
<
Special ~
For custom Lsp Kind Icon and Color
>lua
require("lspsaga").setup {
ui = {
kind = require("catppuccin.groups.integrations.lsp_saga").custom_kind(),
},
}
<
lualine.nvimSpecial ~
>lua
require('lualine').setup {
options = {
theme = "catppuccin"
-- ... the rest of your lualine config
}
}
<
markdown>lua
markdown = true
<
mason.nvim>lua
mason = false
<
mini.nvim>lua
mini = {
enabled = true,
indentscope_color = "", -- catppuccin color (eg. `lavender`) Default: text
},
<
neo-tree.nvim>lua
neotree = false
<
neogit>lua
neogit = true
<
neotest>lua
neotest = false
<
noice.nvim>lua
noice = false
<
NormalNvim>lua
NormalNvim = false
<
notifier.nvim>lua
notifier = false
<
nvim-cmp>lua
cmp = true
<
nvim-dap>lua
dap = true
<
Special ~
>lua
local sign = vim.fn.sign_define
sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""})
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
<
nvim-dap-ui>lua
dap_ui = true
<
nvim-lspconfig>lua
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
<
Special ~
In the inners tables you can set the style for the diagnostics, both
`virtual_text` (what you see on the side) and `underlines` (what points
directly at the thing (e.g. an error)).
navic>lua
navic = {
enabled = false,
custom_bg = "NONE", -- "lualine" will set background to mantle
},
<
Special ~
>lua
-- You NEED to enable highlight in nvim-navic setting or it won't work
require("nvim-navic").setup {
highlight = true
}
<
nvim-notify>lua
notify = false
<
nvim-semantic-tokens>lua
semantic_tokens = true
<
nvim-tree.lua>lua
nvimtree = true
<
nvim-treesitter-context>lua
treesitter_context = true
<
nvim-treesitter>lua
treesitter = true
<
nvim-ts-rainbow2>lua
ts_rainbow2 = false
<
nvim-ts-rainbow>lua
ts_rainbow = false
<
nvim-ufo>lua
ufo = true
<
nvim-window-picker>lua
window_picker = false
<
octo.nvim>lua
octo = false
<
overseer.nvim>lua
overseer = false
<
pounce.nvim>lua
pounce = false
<
rainbow-delimiters.nvim>lua
rainbow_delimiters = true
<
reactive.nvimSpecial ~
There’re 2 available presets (`cursor` and `cursorline`) for every flavour.
Here is how you can use them.
>lua
require('reactive').setup {
load = { 'catppuccin-mocha-cursor', 'catppuccin-mocha-cursorline' }
}
<
To use another flavour just replace `mocha` with the one you want to use.
symbols-outline.nvim
[!NOTE] This plugin has been archived by the author, consider using
outline.nvim <https://github.com/hedyhli/outline.nvim>
>lua
symbols_outline = false
<
telekasten.nvim>lua
telekasten = false
<
telescope.nvim>lua
telescope = {
enabled = true,
-- style = "nvchad"
}
<
trouble.nvim>lua
lsp_trouble = false
<
vim-airlineSpecial ~
>vim
let g:airline_theme = 'catppuccin'
<
vim-clapSpecial ~
Use this to set it up:
>vim
let g:clap_theme = 'catppuccin'
<
vim-gitgutter>lua
gitgutter = false
<
vim-illuminate>lua
illuminate = {
enabled = true,
lsp = false
}
<
vim-sandwich>lua
sandwich = false
<
vim-sneak>lua
vim_sneak = false
<
vimwiki>lua
vimwiki = false
<
which-key.nvim>lua
which_key = false
<
==============================================================================
7. Compile *catppuccin-compile*
**Important** As of 7/10/2022, catppuccin should be able to automatically
recompile when the setup table changed.
Catppuccin is a highly customizable and configurable colorscheme. This does
however come at the cost of complexity and execution time. Catppuccin can pre
compute the results of your configuration and store the results in a compiled
lua file. We use these precached values to set it’s highlights.
By default catppuccin writes the compiled results into the system’s cache
directory. You can change the cache dir using:
>lua
require("catppuccin").setup({ -- Note: On windows we replace `/` with `\` by default
compile_path = vim.fn.stdpath "cache" .. "/catppuccin"
})
<
==============================================================================
8. FAQ *catppuccin-faq*
WRONG TREESITTER HIGHLIGHTS *catppuccin-faq-wrong-treesitter-highlights*
Please disable `additional_vim_regex_highlighting`
>lua
require("nvim-treesitter.configs").setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false
},
}
<
COLORS DOESN’T MATCH PREVIEW SCREENSHOTS*catppuccin-faq-colors-doesn’t-match-preview-screenshots*
Catppuccin requires true color support AKA terminals support the full range of
16 million colors
- Supported: iterm2 (macOS), kitty, wezterm, alacritty, tmux, …
Full list of support terminals can be found here:
<https://github.com/termstandard/colors#truecolor-support-in-output-devices>
- Unsupported terminal: Terminal.app (macOS), Terminus, Terminology, …
Full list of Unsupported terminals can be found here:
<https://github.com/termstandard/colors#not-supporting-truecolor>
FOR TMUX USERS ~
- Enable true color support <https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6> to fix the following abnormal colors <https://github.com/catppuccin/nvim/issues/415>:
- Enable italic font support <https://gist.github.com/gyribeiro/4192af1aced7a1b555df06bd3781a722> to fix the following incorrect if, then, else, end highlights <https://github.com/catppuccin/nvim/issues/428>:
==============================================================================
9. Thanks to *catppuccin-thanks-to*
- Pocco81 <https://github.com/Pocco81>
- nullchilly <https://github.com/nullchilly>
==============================================================================
10. Links *catppuccin-links*
1. *image*: https://user-images.githubusercontent.com/1941785/220280749-c3ab52fb-9b8a-4f04-ab98-f8c1bb41f84b.png
2. *image*: https://user-images.githubusercontent.com/13246770/224011118-dcf0f567-650a-4eb2-8be6-0af5cf435501.png
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: