14 KiB
About
π² Table of Contents
π¨ Flavors
Catppuccino Dark
Neon Latte
Light Melya
π Features
- Multiple colorschemes (AKA flavors) available!
- Handy CLI for loading colorschemes.
- Allows user remaps.
- Extensible for many use cases.
- Integrations with a lot of stuff:
πΊ Notices
Checkout the CHANGELOG.md file for more information on the notices below:
- 22-08-21: Just released!
Old notices...
π¦ Installation
Prerequisites
Adding the plugin
You can use your favorite plugin manager for this. Here are some examples with the most popular ones:
Vim-plug
Plug 'Pocco81/Catppuccino.nvim'
Packer.nvim
use "Pocco81/Catppuccino.nvim"
Vundle
Plugin 'Pocco81/Catppuccino.nvim'
NeoBundle
NeoBundleFetch 'Pocco81/Catppuccino.nvim'
Setup
There are already some sane defaults that you may like, however you can change them to match your taste. These are the defaults:
colorscheme = "catppuccino",
transparency = false,
styles = {
comments = "italic",
functions = "italic",
keywords = "italic",
strings = "NONE",
variables = "NONE",
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
styles = {
errors = "italic",
hints = "italic",
warnings = "italic",
information = "italic"
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = false,
gitsigns = false,
telescope = false,
nvimtree = {
enabled = false,
show_root = false,
},
which_key = false,
indent_blankline = false,
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
}
The way you setup the settings on your configuration varies on whether you are using vimL for this or Lua.
For init.lua
local catppuccino = require("catppuccino")
-- configure it
catppuccino.setup(
{
colorscheme = "catppuccino",
transparency = false,
styles = {
comments = "italic",
functions = "italic",
keywords = "italic",
strings = "NONE",
variables = "NONE",
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
styles = {
errors = "italic",
hints = "italic",
warnings = "italic",
information = "italic"
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = false,
gitsigns = false,
telescope = false,
nvimtree = {
enabled = false,
show_root = false,
},
which_key = false,
indent_blankline = false,
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
}
}
)
-- load it
catppuccino.load()
For init.vim
lua << EOF
local catppuccino = require("catppuccino")
-- configure it
catppuccino.setup(
{
colorscheme = "catppuccino",
transparency = false,
styles = {
comments = "italic",
functions = "italic",
keywords = "italic",
strings = "NONE",
variables = "NONE",
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
styles = {
errors = "italic",
hints = "italic",
warnings = "italic",
information = "italic"
}
},
lsp_trouble = false,
lsp_saga = false,
gitgutter = false,
gitsigns = false,
telescope = false,
nvimtree = {
enabled = false,
show_root = false,
},
which_key = false,
indent_blankline = false,
dashboard = false,
neogit = false,
vim_sneak = false,
fern = false,
barbar = false,
bufferline = false,
markdown = false,
}
}
)
-- load it
catppuccino.load()
EOF
For instructions on how to configure the plugin, check out the configuration section.
Updating
This depends on your plugin manager. If, for example, you are using Packer.nvim, you can update it with this command:
:PackerUpdate
π€ Usage
Commands
The only command provided follows the camel casing naming convention and has the CP
prefix so that it's easy to remember that it's part of Catppuccino.nvim:
:CPLoad <colorscheme>
loads the passed<colorscheme>
.
π¬ Configuration
Although settings already have self-explanatory names, here is where you can find info about each one of them and their classifications!
General
This settings are unrelated to any group and are independent.
colorscheme
: (String) code name of the color-scheme to be used. All of them can be found in the section below.transparency
: (Boolean) if true, disables setting the background color.
Styles
Handles the style of general hi groups (see :h highlight-args
):
comments
: (String) changed the style of the comments.functions
: (String) changed the style of the functions.keywords
: (String) changed the style of the keywords.strings
: (String) changed the style of the strings.variables
: (String) changed the style of the variables.
Integrations
These integrations allow Catppuccino to set the theme of various plugins/stuff. To enable an integration you just need to set it to true
, however, there are some special integrations...
If you'd like to know which highlight groups are being affected by Catppuccino, checkout this directory: lua/catppuccino/core/integrations/
.
Special Integrations
- Native Nvim LSP: setting
enabled
totrue
enables this integration. In the inner table (styles
) you can set that the style for virtual diagnostics. - Lualine: use this to set it up (Note:
catppuccino
is the only valid theme name. It will pick the one set in your config):
require('lualine').setup {
options = {
theme = "catppuccino"
-- ... the rest of your lualine config
}
}
- Lightline: use this to set it up (Note:
catppuccino
is the only valid colorscheme name. It will pick the one set in your config):
let g:lightline = {'colorscheme': 'catppuccino'}
- Kitty: Copy and paste the file corresponding to theme you want to use from this directory on your Kitty config.
- Alacritty: Copy and paste the file corresponding to theme you want to use from this directory on your Alacritty config.
- NvimTree: setting
enabled
totrue
enables this integration:
integration = {
nvimtree = {
enabled = true,
show_root = true, -- makes the root folder not transparent
}
}
List of colorschemes
Colorschemes | Code Names |
---|---|
Catppuccino Dark | catppuccino |
Neon Latte | neon_latte |
Light Melya | light_melya |
Overriding colors
To override the colors for the Catppuccino theme you are using you'll pass the parameters to the setup()
function you already used for configuring the plugin. This is the structure:
local catppuccino = require("catppuccino")
catppuccino.setup({<your_settings>}, {your_color_overrides})
Example: setting the colorscheme to Neon Latte
and changing the color red
to #ffffff
(white).
local catppuccino = require("catppuccino")
catppuccino.setup({
colorscheme = "neon_latte",
}, {
red = "#ffffff",
})
You could use an existing color scheme as a template if you will (lua/catppuccino/color_schemes
)
Available colors
bg
: nvim background color.fg
: color of the text.fg_gutter
black
gray
red
green
yellow
blue
magenta
cyan
white
orange
pink
black_br
red_bg
green_br
yellow_br
blue_br
magenta_br
cyan_br
white_br
orange_br
pink_br
comment
git
:
git = {
add
change
delete
conflict
},
bg_alt
bg_highlight
fg_alt
git.ignore
diff
:
diff = { -- also used for gitsigns
add,
delete,
change,
text,
}
border_highlight
border
bg_popup
bg_statusline
bg_sidebar
bg_float
bg_visual
bg_search
fg_sidebar
error
warning
info
hint
variable
Hooks
Use them to execute code at certain events [described by their names]. These are the ones available:
Function | Description |
---|---|
before_loading() |
Before loading a colorscheme |
after_loading() |
After loading a colorscheme |
They can be used like so:
local catppuccino = require("catppuccino")
catppuccino.before_loading = function ()
print("I ran before setting a colorscheme!")
end
π FAQ
-
Q: "How can I view the doc from NeoVim?" A: Use
:help Catppuccino.nvim
-
Q: "Why are the colorschemes named like that? Do they follow any convention(s)?" A: A colorscheme's name is constructed by two words: the first one is a word that represents the tonalities in the colors used and the second one is the name of a coffee drink from this list.
π Contribute
Pull Requests are welcomed as long as they are properly justified and there are no conflicts. If your PR has something to do with the README or in general related with the documentation, I'll gladly merge it! Also, when writing code for the project you must use the .editorconfig file on your editor so as to "maintain consistent coding styles". For instructions on how to use this file refer to EditorConfig's website.
π Inspirations
The following projects inspired the creation of Catppuccino.nvim. If possible, go check them out to see why they are so amazing :]
- folke/tokyonight.nvim: A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
- norcalli/nvim-base16.lua: Programmatic lua library for setting base16 themes in Neovim.
π License
Catppuccino.nvim is released under the GPL v3.0 license. It grants open-source permissions for users including:
- The right to download and run the software freely
- The right to make changes to the software as desired
- The right to redistribute copies of the software
- The right to modify and distribute copies of new versions of the software
For more convoluted language, see the LICENSE file.
π TO-DO
High Priority
- Add Aquamarine FrappΓ©
Low Priority
- Finish DOC
- Add more integrations
Enjoy!