Port Catppuccin ini istimewa karena itu adalah yang pertama dan yang berasal dari proyek itu sendiri. Mengingat hal ini, penting untuk mengakui bahwa itu semua tidak menjadi seperti sekarang entah dari mana. Jadi, jika Anda tertarik untuk mengetahui lebih banyak tentang tahap awal tema, Anda dapat menemukannya di bawah tag v0.1
Panggang rasa Anda sendiri! Berikut beberapa konfigurasi dari komunitas kami : (sumber latar belakang)
Lazy.nvim
{ " catppuccin/nvim " , name = " catppuccin " , priority = 1000 }
mini.deps
add ({ source = " catppuccin/nvim " , name = " catppuccin " })
packer.nvim
use { " catppuccin/nvim " , as = " catppuccin " }
vim-plug
Plug ' catppuccin/nvim ' , { ' as ' : ' catppuccin ' }
colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
vim . cmd . colorscheme " catppuccin "
Tidak perlu menghubungi setup
jika Anda tidak ingin mengubah opsi dan pengaturan default.
require ( " catppuccin " ). setup ({
flavour = " auto " , -- latte, frappe, macchiato, mocha
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 "
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 "
Mengembalikan tabel di mana kunci adalah nama warna dan nilainya adalah nilai hex yang sesuai dengan setiap rasa.
Warna dapat ditimpa menggunakan color_overrides
dalam pengaturan, checkout #323 untuk inspirasi:
require ( " catppuccin " ). setup {
color_overrides = {
all = {
text = " #ffffff " ,
},
latte = {
base = " #ff0000 " ,
mantle = " #242424 " ,
crust = " #474747 " ,
},
frappe = {},
macchiato = {},
mocha = {},
}
}
Catatan
Untuk informasi lebih lanjut, lihat panduan gaya kami
Grup highlight global dapat ditimpa dalam pengaturan, misalnya:
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
}
Kelompok highlight per rasa juga dapat ditimpa dalam pengaturan, misalnya:
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 ,
},
}
CatpPuccin menyediakan dukungan tema untuk plugin lain di ekosistem Neovim dan fungsionalitas Neovim yang diperluas melalui integrasi .
Untuk mengaktifkan/menonaktifkan integrasi, Anda hanya perlu mengaturnya ke True/False, misalnya:
require ( " catppuccin " ). setup ({
integrations = {
cmp = true ,
gitsigns = true ,
nvimtree = true ,
treesitter = true ,
notify = false ,
mini = {
enabled = true ,
indentscope_color = " " ,
},
}
})
Beberapa integrasi diaktifkan secara default, Anda dapat mengontrol perilaku ini dengan opsi default_integrations
.
require ( " catppuccin " ). setup ({
default_integrations = false ,
})
Di bawah ini adalah daftar plugin yang didukung dan modul integrasi yang sesuai.
Penting
Jika Anda ingin mengetahui kelompok sorotan mana yang dipengaruhi oleh catppuccin, lihat direktori ini: lua/catppuccin/groups/integrations/
.
Plugin | Bawaan |
Aerial.nvim | aerial = false |
alpha-nvim | alpha = true |
Barbar.nvim | barbar = false |
Barbecue.nvim | barbecue = {
dim_dirname = true , -- directory name is dimmed by default
bold_basename = true ,
dim_context = false ,
alt_background = false ,
}, SpesialGunakan ini untuk mengaturnya: require ( " barbecue " ). setup {
theme = " catppuccin " , -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
} |
Beacon.nvim | beacon = false |
blink.cmp | blink_cmp = false |
bufferline.nvim | SpesialPerbarui konfigurasi bufferline Anda untuk menggunakan komponen Catppuccin:
use " akinsho/bufferline.nvim " {
after = " catppuccin " ,
config = function ()
require ( " bufferline " ). setup {
highlights = require ( " catppuccin.groups.integrations.bufferline " ). get ()
}
end
} Konfigurasi jelas, lihat 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 | coc_nvim = false Spesial Pengaturan coc_nvim = true ,
Dalam tabel Inners Anda dapat mengatur gaya untuk diagnostik, baik native_lsp = {
enabled = true ,
virtual_text = {
errors = { " italic " },
hints = { " italic " },
warnings = { " italic " },
information = { " italic " },
ok = { " italic " },
},
underlines = {
errors = { " underline " },
hints = { " underline " },
warnings = { " underline " },
information = { " underline " },
ok = { " underline " },
},
inlay_hints = {
background = true ,
},
}, |
warna-warni-winsep.nvim | colorful_winsep = {
enabled = false ,
color = " red " ,
} |
Dashboard-NVIM | dashboard = true |
Diffview.nvim | diffview = false |
dropbar.nvim | dropbar = {
enabled = false ,
color_mode = false , -- enable color for kind's texts, not just kind's icons
}, |
Feline.nvim | SpesialPerbarui konfigurasi kucing Anda untuk menggunakan komponen Catppuccin: local ctp_feline = require ( ' catppuccin.groups.integrations.feline ' )
ctp_feline . setup ()
require ( " feline " ). setup ({
components = ctp_feline . get (),
}) Perhatikan bahwa Inilah default: 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 = false -- show if the file has been modified
show_lazy_updates = false -- show the count of updatable plugins from lazy.nvim
-- need to set checker.enabled = true in lazy.nvim first
-- the icon is set in ui.icons.plugin in lazy.nvim
},
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 },
},
view = {
lsp = {
progress = true , -- if true the status bar will display an lsp progress indicator
name = false , -- if true the status bar will display the lsp servers name, otherwise it will display the text "Lsp"
exclude_lsp_names = {}, -- lsp server names that should not be displayed when name is set to true
separator = " | " , -- the separator used when there are multiple lsp servers
},
}
})
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 | fern = false |
fidget.nvim | fidget = false SpesialSet `notification.window.winblend` ke` 0`: require ( " fidget " ). setup {
notification = {
window = {
winblend = 0 ,
},
}
-- ... the rest of your fidget config
} |
flash.nvim | flash = true |
FZF-Lua | fzf = true |
gitsigns.nvim | gitsigns = true |
Grug-far.nvim | grug_far = false |
seruit | harpoon = false |
headlines.nvim | headlines = false |
hop.nvim | hop = false |
indent-blankline.nvim | indent_blankline = {
enabled = true ,
scope_color = " " , -- catppuccin color (eg. `lavender`) Default: text
colored_indent_levels = false ,
},
Spesial |
leap.nvim | leap = false |
lightline.vim | Spesial let g: lightline = { ' colorscheme ' : ' catppuccin ' } |
lightspeed.nvim | lightspeed = false |
lir.nvim | lir = {
enabled = false ,
git_status = false
} |
lspsaga.nvim | lsp_saga = false SpesialUntuk ikon dan warna Kind Kustom require ( " lspsaga " ). setup {
ui = {
kind = require ( " catppuccin.groups.integrations.lsp_saga " ). custom_kind (),
},
} |
lualine.nvim | Spesial require ( ' lualine ' ). setup {
options = {
theme = " catppuccin "
-- ... the rest of your lualine config
}
} |
penurunan harga | markdown = true |
Mason.nvim | mason = false |
mini.nvim | mini = {
enabled = true ,
indentscope_color = " " , -- catppuccin color (eg. `lavender`) Default: text
}, |
neoo-tree.nvim | neotree = true |
Neogit | neogit = true |
neotest | neotest = false |
noice.nvim | noice = false |
NormalNvim | NormalNvim = false |
notifier.nvim | notifier = false |
NVIM-CMP | cmp = true |
NVIM-DAP | dap = true Spesial 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 | dap_ui = true |
NVIM-LSPConfig | native_lsp = {
enabled = true ,
virtual_text = {
errors = { " italic " },
hints = { " italic " },
warnings = { " italic " },
information = { " italic " },
ok = { " italic " },
},
underlines = {
errors = { " underline " },
hints = { " underline " },
warnings = { " underline " },
information = { " underline " },
ok = { " underline " },
},
inlay_hints = {
background = true ,
},
}, Spesial Dalam tabel Inners Anda dapat mengatur gaya untuk diagnostik, baik |
Navic | navic = {
enabled = false ,
custom_bg = " NONE " , -- "lualine" will set background to mantle
},
Spesial -- You NEED to enable highlight in nvim-navic setting or it won't work
require ( " nvim-navic " ). setup {
highlight = true
} |
nvim-notify | notify = false |
nvim-semantik-tokens | semantic_tokens = true |
NVIM-Surround | nvim_surround = false |
nvim-tree.lua | nvimtree = true |
NVIM-Treesitter-Context | treesitter_context = true |
NVIM-Treesitter | treesitter = true |
NVIM-TS-RAINBOW2 | ts_rainbow2 = false |
nvim-ts-rainbow | ts_rainbow = false |
nvim-ufo | ufo = true |
nvim-window-picker | window_picker = false |
octo.nvim | octo = false |
overseer.nvim | overseer = false |
Pounce.nvim | pounce = false |
Rainbow-Delimiters.nvim | rainbow_delimiters = true |
reactive.nvim | Spesial Ada 2 preset yang tersedia ( Inilah cara Anda dapat menggunakannya. require ( ' reactive ' ). setup {
load = { ' catppuccin-mocha-cursor ' , ' catppuccin-mocha-cursorline ' }
} Untuk menggunakan rasa lain, ganti |
render-markdown.nvim | render_markdown = true |
simbol-outline.nvim | Catatan Plugin ini telah diarsipkan oleh penulis, pertimbangkan untuk menggunakan outline.nvim symbols_outline = false |
Telekasten.nvim | telekasten = false |
Telescope.nvim | telescope = {
enabled = true ,
-- style = "nvchad"
} |
Trouble.nvim | lsp_trouble = false |
VIM-AIRLINE | Spesial let g: airline_theme = ' catppuccin ' |
vim-clap | SpesialGunakan ini untuk mengaturnya: let g: clap_theme = ' catppuccin ' |
vim-dadbod-ui | dadbod_ui = false |
vim-gitgutter | gitgutter = false |
vim-illuminate | illuminate = {
enabled = true ,
lsp = false
} |
Vim-Sandwich | sandwich = false |
vim-sneak | vim_sneak = false |
Vimwiki | vimwiki = false |
mana-key.nvim | which_key = false |
Penting pada 7/10/2022, catppuccin harus dapat mengkompilasi ulang secara otomatis ketika tabel pengaturan diubah.
Catppuccin adalah warna warna yang sangat dapat disesuaikan dan dapat dikonfigurasi. Namun ini terjadi dengan biaya kompleksitas dan waktu eksekusi. Catppuccin dapat menghitung hasil konfigurasi Anda dan menyimpan hasilnya dalam file LUA yang dikompilasi. Kami menggunakan nilai -nilai praCached ini untuk mengatur sorotannya.
Secara default CatpPuccin menulis hasil yang dikompilasi ke dalam direktori cache sistem. Anda dapat mengubah cache dir menggunakan:
require ( " catppuccin " ). setup ({ -- Note: On windows we replace `/` with `` by default
compile_path = vim . fn . stdpath " cache " .. " /catppuccin "
})
Harap nonaktifkan additional_vim_regex_highlighting
require ( " nvim-treesitter.configs " ). setup {
highlight = {
enable = true ,
additional_vim_regex_highlighting = false
},
}
Catppuccin membutuhkan dukungan warna sejati alias terminal mendukung rentang penuh 16 juta warna
Daftar lengkap terminal dukungan dapat ditemukan di sini: https://github.com/termstandard/colors#truecolor-support-in-output-devices
Daftar lengkap terminal yang tidak didukung dapat ditemukan di sini: https://github.com/termstandard/colors#not-supporting-truecolor
Hak Cipta © 2021-sekarang Catppuccin Org