Este puerto de Catppuccin es especial porque fue el primero y el que originó el proyecto en sí. Dado esto, es importante reconocer que todo no llegó a ser lo que ahora es de la nada. Entonces, si está interesado en saber más sobre las etapas iniciales del tema, puede encontrarlo en la etiqueta V0.1
¡Hornee su propio sabor! Aquí hay alguna configuración de nuestra comunidad : (fuente de fondo)
perezoso.nvim
{ " catppuccin/nvim " , name = " catppuccin " , priority = 1000 }
mini.eps
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 "
No es necesario que setup
de llamadas si no desea cambiar las opciones y la configuración predeterminados.
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 "
Devuelve una tabla donde la clave es el nombre del color y el valor es su valor hexadecimal correspondiente a cada sabor.
Los colores se pueden sobrescribir usando color_overrides
en la configuración, consulte #323 para inspiraciones:
require ( " catppuccin " ). setup {
color_overrides = {
all = {
text = " #ffffff " ,
},
latte = {
base = " #ff0000 " ,
mantle = " #242424 " ,
crust = " #474747 " ,
},
frappe = {},
macchiato = {},
mocha = {},
}
}
Nota
Para más información, consulte nuestra guía de estilo
Los grupos destacados globales se pueden sobrescribir en el entorno, por ejemplo:
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
}
Los grupos destacados por sabor también se pueden sobrescribir en el entorno, por ejemplo:
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 proporciona soporte de tema para otros complementos en el ecosistema neovim y la funcionalidad neovim extendida a través de integraciones .
Para habilitar/deshabilitar una integración, solo necesita establecerla en True/False, por ejemplo:
require ( " catppuccin " ). setup ({
integrations = {
cmp = true ,
gitsigns = true ,
nvimtree = true ,
treesitter = true ,
notify = false ,
mini = {
enabled = true ,
indentscope_color = " " ,
},
}
})
Algunas integraciones están habilitadas de forma predeterminada, puede controlar este comportamiento con la opción default_integrations
.
require ( " catppuccin " ). setup ({
default_integrations = false ,
})
A continuación se muestra una lista de complementos compatibles y su módulo de integración correspondiente.
Importante
Si desea saber qué grupos destacados se ven afectados por Catppuccin, consulte este directorio: lua/catppuccin/groups/integrations/
.
Complemento | Por defecto |
Aerial.nvim | aerial = false |
alpha-nvim | alpha = true |
Barbar.nvim | barbar = false |
barbacoa.nvim | barbecue = {
dim_dirname = true , -- directory name is dimmed by default
bold_basename = true ,
dim_context = false ,
alt_background = false ,
}, EspecialUse esto para configurarlo: require ( " barbecue " ). setup {
theme = " catppuccin " , -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
} |
Beacon.nvim | beacon = false |
Blink.cmp | blink_cmp = false |
bufferline.nvim | EspecialActualice su configuración de línea de búfer para usar los componentes de Catppuccin:
use " akinsho/bufferline.nvim " {
after = " catppuccin " ,
config = function ()
require ( " bufferline " ). setup {
highlights = require ( " catppuccin.groups.integrations.bufferline " ). get ()
}
end
} Las configuraciones se explican por sí mismas, consulte 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 Especial La configuración coc_nvim = true ,
En las tablas de Inners, puede establecer el estilo para los diagnósticos, tanto 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 ,
},
}, |
colorido-winsep.nvim | colorful_winsep = {
enabled = false ,
color = " red " ,
} |
tablero de control | dashboard = true |
diffview.nvim | diffview = false |
barra de guarnición | dropbar = {
enabled = false ,
color_mode = false , -- enable color for kind's texts, not just kind's icons
}, |
feline.nvim | EspecialActualice su configuración felina para usar los componentes de Catppuccin: local ctp_feline = require ( ' catppuccin.groups.integrations.feline ' )
ctp_feline . setup ()
require ( " feline " ). setup ({
components = ctp_feline . get (),
}) Observe que Aquí están los valores predeterminados: 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 ,
}) |
helecho | fern = false |
fidget.nvim | fidget = false EspecialEstablecer `notificación.window.winblend` a` 0`: require ( " fidget " ). setup {
notification = {
window = {
winblend = 0 ,
},
}
-- ... the rest of your fidget config
} |
flash.vim | flash = true |
FZF-LUA | fzf = true |
gitsigns.nvim | gitsigns = true |
Grug-far.nvim | grug_far = false |
arpón | harpoon = false |
titulares.nvim | headlines = false |
Hop.nvim | hop = false |
sangría-blankline.nvim | indent_blankline = {
enabled = true ,
scope_color = " " , -- catppuccin color (eg. `lavender`) Default: text
colored_indent_levels = false ,
},
Especial |
salto.nvim | leap = false |
Lightline.vim | Especial let g: lightline = { ' colorscheme ' : ' catppuccin ' } |
luz de luz.nvim | lightspeed = false |
lir.nvim | lir = {
enabled = false ,
git_status = false
} |
lspsaga.nvim | lsp_saga = false EspecialPara icono y color de tipo LSP personalizado require ( " lspsaga " ). setup {
ui = {
kind = require ( " catppuccin.groups.integrations.lsp_saga " ). custom_kind (),
},
} |
Lualine.nvim | Especial require ( ' lualine ' ). setup {
options = {
theme = " catppuccin "
-- ... the rest of your lualine config
}
} |
reducción | markdown = true |
Masón.nvim | mason = false |
mini.nvim | mini = {
enabled = true ,
indentscope_color = " " , -- catppuccin color (eg. `lavender`) Default: text
}, |
neo-tree.nvim | neotree = true |
neógito | neogit = true |
neotest | neotest = false |
noice.nvim | noice = false |
Normalnvim | NormalNvim = false |
notificador.nvim | notifier = false |
nvim-cmp | cmp = true |
nvim-dap | dap = true Especial 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 ,
},
}, Especial En las tablas de Inners, puede establecer el estilo para los diagnósticos, tanto |
navic | navic = {
enabled = false ,
custom_bg = " NONE " , -- "lualine" will set background to mantle
},
Especial -- 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-semántico-tokens | semantic_tokens = true |
nvim-surround | nvim_surround = false |
nvim-tree.lua | nvimtree = true |
nvim-treesitter-contexto | treesitter_context = true |
nvim-treesitter | treesitter = true |
NVIM-TS-RAINBOW2 | ts_rainbow2 = false |
nvim-ts-rainbow | ts_rainbow = false |
nvim-ufo | ufo = true |
piloto | window_picker = false |
octo.nvim | octo = false |
supervisor.nvim | overseer = false |
salto.nvim | pounce = false |
Rainbow-Delimitors.nvim | rainbow_delimiters = true |
reactivo.nvim | Especial Hay 2 preajustes disponibles ( Así es como puedes usarlos. require ( ' reactive ' ). setup {
load = { ' catppuccin-mocha-cursor ' , ' catppuccin-mocha-cursorline ' }
} Para usar otro sabor, simplemente reemplace |
render-markdown.nvim | render_markdown = true |
símbolos-outline.nvim | Nota Este complemento ha sido archivado por el autor, considere usar Outline.nvim symbols_outline = false |
telekasten.nvim | telekasten = false |
telescopio.nvim | telescope = {
enabled = true ,
-- style = "nvchad"
} |
trouble.nvim | lsp_trouble = false |
vim-airline | Especial let g: airline_theme = ' catppuccin ' |
plapa de vim | EspecialUse esto para configurarlo: let g: clap_theme = ' catppuccin ' |
vim-dadbod-ui | dadbod_ui = false |
vim-gitgutter | gitgutter = false |
vim-iluminado | illuminate = {
enabled = true ,
lsp = false
} |
vim-sandwich | sandwich = false |
vim-sneak | vim_sneak = false |
vimwiki | vimwiki = false |
qué-key.nvim | which_key = false |
Importante a partir del 7/10/2022, la catppuccina debería poder recompilar automáticamente cuando cambió la tabla de configuración.
Catppuccin es un ColorScheme altamente personalizable y configurable. Sin embargo, esto viene a costa de la complejidad y el tiempo de ejecución. Catppuccin puede calcular los resultados de su configuración y almacenar los resultados en un archivo LUA compilado. Usamos estos valores precachados para establecer sus resaltados.
Por defecto, Catppuccin escribe los resultados compilados en el directorio de caché del sistema. Puede cambiar el Dir de Cache usando:
require ( " catppuccin " ). setup ({ -- Note: On windows we replace `/` with `` by default
compile_path = vim . fn . stdpath " cache " .. " /catppuccin "
})
Deshabilite additional_vim_regex_highlighting
require ( " nvim-treesitter.configs " ). setup {
highlight = {
enable = true ,
additional_vim_regex_highlighting = false
},
}
Catppuccin requiere soporte de color verdadero, también conocido como terminales, admite el rango completo de 16 millones de colores
La lista completa de terminales de soporte se puede encontrar aquí: https://github.com/termstandard/colors#truecolor-support-in-output -devices
Se puede encontrar una lista completa de terminales no compatibles aquí: https://github.com/termstandard/colors#not-supporting-truecolor
Copyright © 2021 presente Catppuccin Org