這是catppucin的港口很特別,因為它是第一個發起了項目本身的港口。鑑於此,重要的是要認識到,一切都不是現在毫無疑問的東西。因此,如果您有興趣了解主題的初始階段,則可以在v0.1標籤下找到它
烤自己的味道!這是我們社區的一些配置:(背景來源)
懶惰
{ " catppuccin/nvim " , name = " catppuccin " , priority = 1000 }
mini.deps
add ({ source = " catppuccin/nvim " , name = " catppuccin " })
Packer.nvim
use { " catppuccin/nvim " , as = " catppuccin " }
vim插頭
Plug ' catppuccin/nvim ' , { ' as ' : ' catppuccin ' }
colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
vim . cmd . colorscheme " catppuccin "
如果您不想更改默認選項和設置,則無需調用setup
。
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 "
返回一個表,其中鍵是顏色的名稱,值是其與每個風味相對應的十六進制值。
顏色可以在設置中使用color_overrides
覆蓋,請結帳#323以獲取靈感:
require ( " catppuccin " ). setup {
color_overrides = {
all = {
text = " #ffffff " ,
},
latte = {
base = " #ff0000 " ,
mantle = " #242424 " ,
crust = " #474747 " ,
},
frappe = {},
macchiato = {},
mocha = {},
}
}
筆記
有關更多信息,請查看我們的樣式指南
例如,可以在設置中覆蓋全球亮點組:
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
}
每個風味突出顯示組也可以在設置中被覆蓋:
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 ,
},
}
Catppucin為Neovim生態系統中其他插件提供主題支持,並通過集成擴展Neovim功能。
要啟用/禁用集成,您只需要將其設置為True/false,例如:
require ( " catppuccin " ). setup ({
integrations = {
cmp = true ,
gitsigns = true ,
nvimtree = true ,
treesitter = true ,
notify = false ,
mini = {
enabled = true ,
indentscope_color = " " ,
},
}
})
默認情況下啟用了一些集成,您可以使用default_integrations
選項控制此行為。
require ( " catppuccin " ). setup ({
default_integrations = false ,
})
以下是支持的插件及其相應集成模塊的列表。
重要的
如果您想知道哪些突出顯示的組受catppucin的影響,請查看此目錄: lua/catppuccin/groups/integrations/
。
插件 | 預設 |
空中 | aerial = false |
alpha-nvim | alpha = true |
barbar.nvim | barbar = false |
燒烤 | barbecue = {
dim_dirname = true , -- directory name is dimmed by default
bold_basename = true ,
dim_context = false ,
alt_background = false ,
}, 特別的用它來設置它: require ( " barbecue " ). setup {
theme = " catppuccin " , -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
} |
信標 | beacon = false |
blink.cmp | blink_cmp = false |
bufferline.nvim | 特別的更新您的Bufferline配置以使用catppucin組件:
use " akinsho/bufferline.nvim " {
after = " catppuccin " ,
config = function ()
require ( " bufferline " ). setup {
highlights = require ( " catppuccin.groups.integrations.bufferline " ). get ()
}
end
} 配置是自稱的,請參見 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 特別的設置 coc_nvim = true ,
在Inners表中,您可以為診斷設置樣式,包括 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 ,
},
}, |
彩色勝利 | colorful_winsep = {
enabled = false ,
color = " red " ,
} |
儀表板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
}, |
貓科動物 | 特別的更新您的貓科目配置以使用catppucin組件: local ctp_feline = require ( ' catppuccin.groups.integrations.feline ' )
ctp_feline . setup ()
require ( " feline " ). setup ({
components = ctp_feline . get (),
}) 請注意,呼叫 這是默認值: 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 = false |
fidget.nvim | fidget = false 特別的將`n notification.window.winblend`設置為`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 |
魚叉 | harpoon = false |
頭條新聞 | headlines = false |
Hop.nvim | hop = false |
契約 | indent_blankline = {
enabled = true ,
scope_color = " " , -- catppuccin color (eg. `lavender`) Default: text
colored_indent_levels = false ,
},
特別的
|
leap.nvim | leap = false |
Lightline.vim | 特別的 let g: lightline = { ' colorscheme ' : ' catppuccin ' } |
Lightspeed.nvim | lightspeed = false |
lir.nvim | lir = {
enabled = false ,
git_status = false
} |
lspsaga.nvim | lsp_saga = false 特別的用於自定義LSP型圖標和顏色 require ( " lspsaga " ). setup {
ui = {
kind = require ( " catppuccin.groups.integrations.lsp_saga " ). custom_kind (),
},
} |
lualine.nvim | 特別的 require ( ' lualine ' ). setup {
options = {
theme = " catppuccin "
-- ... the rest of your lualine config
}
} |
降價 | markdown = true |
梅森 | mason = false |
Mini.nvim | mini = {
enabled = true ,
indentscope_color = " " , -- catppuccin color (eg. `lavender`) Default: text
}, |
neo-tree.nvim | neotree = true |
Neogit | neogit = true |
新的 | neotest = false |
noice.nvim | noice = false |
正常 | NormalNvim = false |
notifier.nvim | notifier = false |
NVIM-CMP | cmp = true |
nvim-dap | dap = true 特別的 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 ,
},
}, 特別的在Inners表中,您可以為診斷設置樣式,包括 |
航海 | navic = {
enabled = false ,
custom_bg = " NONE " , -- "lualine" will set background to mantle
},
特別的 -- 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-semantic-tokens | semantic_tokens = true |
nvim-surnound | 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 = false |
pounce.nvim | pounce = false |
彩虹 - delimiters.nvim | rainbow_delimiters = true |
反應性 | 特別的每種口味都有2個可用的預設( 這是您可以使用它們的方法。 require ( ' reactive ' ). setup {
load = { ' catppuccin-mocha-cursor ' , ' catppuccin-mocha-cursorline ' }
} 要使用另一種味道,只需用您要使用的摩卡咖啡就可以代替 |
Render-Markdown.nvim | render_markdown = true |
符號外線 | 筆記 該插件已由作者存檔,請考慮使用utline.nvim symbols_outline = false |
Telekasten.nvim | telekasten = false |
望遠鏡 | telescope = {
enabled = true ,
-- style = "nvchad"
} |
麻煩 | lsp_trouble = false |
vim-airline | 特別的 let g: airline_theme = ' catppuccin ' |
vim-clap | 特別的用它來設置它: let g: clap_theme = ' catppuccin ' |
vim-dadbod-ui | dadbod_ui = false |
vim-gitgutter | gitgutter = false |
vim-luminate | illuminate = {
enabled = true ,
lsp = false
} |
vim-sandwich | sandwich = false |
vim-sneak | vim_sneak = false |
Vimwiki | vimwiki = false |
哪個鍵 | which_key = false |
從7/10/2022開始,重要的是,catppucin應該能夠在更改設置表時自動重新編譯。
catppucin是一種高度可自定義且可配置的Colorscheme。但是,這確實是以復雜性和執行時間為代價的。 catppucin可以預先計算配置的結果,並將結果存儲在編譯的LUA文件中。我們使用這些刻板值來設置其亮點。
默認情況下,catppucin將編譯結果寫入系統的高速緩存目錄。您可以使用:
require ( " catppuccin " ). setup ({ -- Note: On windows we replace `/` with `` by default
compile_path = vim . fn . stdpath " cache " .. " /catppuccin "
})
請禁用additional_vim_regex_highlighting
require ( " nvim-treesitter.configs " ). setup {
highlight = {
enable = true ,
additional_vim_regex_highlighting = false
},
}
catppucin需要真正的顏色支持又稱終端支持1600萬顏色的全部範圍
可以在此處找到支持終端的完整列表:https://github.com/termstandard/colors#truecolor-support-input-input-devices
可以在此處找到不支持終端的完整列表:https://github.com/termstandard/colors#not-supporting-truecolor
版權所有©2021-Present catppucin org