Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/catppuccin/nvim
🍨 Soothing pastel theme for (Neo)vim
https://github.com/catppuccin/nvim
catppuccin colorscheme hacktoberfest lua neovim neovim-colorscheme neovim-lua neovim-plugin neovim-theme nvim theme vim vim-theme
Last synced: 3 days ago
JSON representation
🍨 Soothing pastel theme for (Neo)vim
- Host: GitHub
- URL: https://github.com/catppuccin/nvim
- Owner: catppuccin
- License: mit
- Created: 2021-08-18T01:14:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T12:26:45.000Z (about 2 months ago)
- Last Synced: 2024-10-29T15:20:22.094Z (about 1 month ago)
- Topics: catppuccin, colorscheme, hacktoberfest, lua, neovim, neovim-colorscheme, neovim-lua, neovim-plugin, neovim-theme, nvim, theme, vim, vim-theme
- Language: Lua
- Homepage:
- Size: 3.04 MB
- Stars: 5,543
- Watchers: 17
- Forks: 247
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-neovim - catppuccin/nvim - Warm mid-tone dark theme to show off your vibrant self! With support for native LSP, Tree-sitter, and more. (Colorscheme / Tree-sitter Supported Colorscheme)
- my-awesome-starred - catppuccin/nvim - 🍨 Soothing pastel theme for (Neo)vim (Lua)
README
Catppuccin for (Neo)vim
This port of Catppuccin is special because it was the first one and the one that originated the project itself. Given this, it's important to acknowledge that it all didn't come to be what it is now out of nowhere. So, if you are interested in knowing more about the initial stages of the theme, you can find it under the v0.1 tag
# Flavours
Latte
Frappe
Macchiato
Mocha
**[Bake your own flavour!](https://github.com/catppuccin/nvim/#overwriting-colors)** Here are some **[config from our community](https://github.com/catppuccin/nvim/discussions/323)**: (background source)
![nvimwalk-custom](https://user-images.githubusercontent.com/56817415/213480149-6ba92b81-1ada-46a4-89bd-4e2bb25d19c3.png)
# 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)# Installation
[lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 }
```[mini.deps](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-deps.md)
```lua
add({ source = "catppuccin/nvim", name = "catppuccin" })
```[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' }
```# Usage
```vim
colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
``````lua
vim.cmd.colorscheme "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 = "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"
```# 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
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
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,
},
}
```# 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).Plugin Default
```lua
aerial = false
``````lua
alpha = true
``````lua
barbar = false
``````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
}
``````lua
beacon = false
``````lua
blink_cmp = false
```Special
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 `:h 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" },
},
},
},
}
``````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 cocIn 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" },
ok = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
ok = { "underline" },
},
inlay_hints = {
background = true,
},
},
``````lua
colorful_winsep = {
enabled = false,
color = "red",
}
``````lua
dashboard = true
``````lua
diffview = false
``````lua
dropbar = {
enabled = false,
color_mode = false, -- enable color for kind's texts, not just kind's icons
},
```Special
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 = 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
},
}
})
```> [!Warning]
> Currently feline [doesn't officially support custom themes](https://github.com/feline-nvim/feline.nvim/issues/302). In order for `:colorscheme catppuccin-` 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,
})
``````lua
fern = false
``````lua
fidget = false
```Special
Set `notification.window.winblend` to `0`:```lua
require("fidget").setup {
notification = {
window = {
winblend = 0,
},
}
-- ... the rest of your fidget config
}
``````lua
flash = true
``````lua
fzf = true
``````lua
gitsigns = true
``````lua
grug_far = false
``````lua
harpoon = false
``````lua
headlines = false
``````lua
hop = false
``````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.
```lua
leap = false
```Special
```vim
let g:lightline = {'colorscheme': 'catppuccin'}
``````lua
lightspeed = false
``````lua
lir = {
enabled = false,
git_status = false
}
``````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(),
},
}
```Special
```lua
require('lualine').setup {
options = {
theme = "catppuccin"
-- ... the rest of your lualine config
}
}
``````lua
markdown = true
``````lua
mason = false
``````lua
mini = {
enabled = true,
indentscope_color = "", -- catppuccin color (eg. `lavender`) Default: text
},
``````lua
neotree = true
``````lua
neogit = true
``````lua
neotest = false
``````lua
noice = false
``````lua
NormalNvim = false
``````lua
notifier = false
``````lua
cmp = true
``````lua
copilot_vim = false,
``````lua
dap = true
```Special
```lua
local sign = vim.fn.sign_definesign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""})
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
``````lua
dap_ui = true
``````lua
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,
},
},
```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)).
```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
}
``````lua
notify = false
``````lua
semantic_tokens = true
``````lua
nvim_surround = false
``````lua
nvimtree = true
``````lua
treesitter_context = true
``````lua
treesitter = true
``````lua
ts_rainbow2 = false
``````lua
ts_rainbow = false
``````lua
ufo = true
``````lua
window_picker = false
``````lua
octo = false
``````lua
overseer = false
``````lua
pounce = false
``````lua
rainbow_delimiters = true
```Special
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.
```lua
render_markdown = true
``````lua
snacks = false
```> [!NOTE]
> This plugin has been archived by the author, consider using [outline.nvim](https://github.com/hedyhli/outline.nvim)```lua
symbols_outline = false
``````lua
telekasten = false
``````lua
telescope = {
enabled = true,
-- style = "nvchad"
}
``````lua
lsp_trouble = false
```Special
```vim
let g:airline_theme = 'catppuccin'
```Special
Use this to set it up:
```vim
let g:clap_theme = 'catppuccin'
``````lua
dadbod_ui = false
``````lua
gitgutter = false
``````lua
illuminate = {
enabled = true,
lsp = false
}
``````lua
sandwich = false
``````lua
vim_sneak = false
``````lua
vimwiki = false
``````lua
which_key = false
```# 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"
})
```# 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 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:
- Unsupported terminal: Terminal.app (macOS), Terminus, Terminology, ...
Full list of Unsupported terminals can be found here:
### 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):
![image](https://user-images.githubusercontent.com/1941785/220280749-c3ab52fb-9b8a-4f04-ab98-f8c1bb41f84b.png)
- [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):
![image](https://user-images.githubusercontent.com/13246770/224011118-dcf0f567-650a-4eb2-8be6-0af5cf435501.png)
# Thanks to
- [Pocco81](https://github.com/Pocco81)
- [nullchilly](https://github.com/nullchilly)
Copyright © 2021-present Catppuccin Org