From 2f1cd1a1c3277350c3122b64b6d889f259b3915c Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Thu, 27 Aug 2026 11:54:06 +0100 Subject: [PATCH] Add catppuccin colorscheme, latte in light mode and macchiato in dark Installed via vim.pack, matching the other plugins here. The pack is named explicitly ('catppuccin') because the repo is called 'nvim', which would otherwise be the plugin's name in the lock file and on disk. flavour = 'auto' with background = { light = 'latte', dark = 'macchiato' } so the flavour follows 'background', which the TUI sets from the terminal on startup. It is required first from config/plugins/init.lua so the other plugins load with the colorscheme already applied. Verified headlessly in a single nvim: `set background=light` gives catppuccin-latte and `set background=dark` gives catppuccin-macchiato, so a running instance can be switched by hand with `:set background=` as the top-level README already suggests. Co-Authored-By: Claude Fable 5 --- neovim/README.md | 6 ++++++ neovim/config/plugins/catppuccin.lua | 12 ++++++++++++ neovim/config/plugins/init.lua | 2 ++ neovim/nvim-pack-lock.json | 4 ++++ 4 files changed, 24 insertions(+) create mode 100644 neovim/config/plugins/catppuccin.lua diff --git a/neovim/README.md b/neovim/README.md index a9bdada..57f4af4 100644 --- a/neovim/README.md +++ b/neovim/README.md @@ -39,6 +39,12 @@ machine gets the same set. ## Defaults worth knowing +- **The colorscheme is catppuccin**, `flavour = 'auto'`: latte on a light + `background`, macchiato on a dark one. The TUI sets `background` from the + terminal at startup, so a fresh nvim matches the system appearance. A running + one does not follow a live change — but `:set background=light` (or `dark`) + swaps the flavour too, since Neovim reloads the colorscheme whenever + `background` is set. - **Spell checking is on globally**, `en_gb` — in every buffer, code included, not just prose filetypes. - **Autocompletion is on** via Neovim's own `vim.o.autocomplete`, with a rounded diff --git a/neovim/config/plugins/catppuccin.lua b/neovim/config/plugins/catppuccin.lua new file mode 100644 index 0000000..b126852 --- /dev/null +++ b/neovim/config/plugins/catppuccin.lua @@ -0,0 +1,12 @@ +vim.pack.add({ { src = 'https://github.com/catppuccin/nvim', name = 'catppuccin' } }) + +require('catppuccin').setup({ + -- Follow 'background', which the TUI sets from the terminal on startup + flavour = 'auto', + background = { + light = 'latte', + dark = 'macchiato', + }, +}) + +vim.cmd.colorscheme('catppuccin') diff --git a/neovim/config/plugins/init.lua b/neovim/config/plugins/init.lua index fc2c8eb..7046983 100644 --- a/neovim/config/plugins/init.lua +++ b/neovim/config/plugins/init.lua @@ -1,3 +1,5 @@ +-- The colorscheme goes first so everything after it is drawn with it applied +require('config.plugins.catppuccin') require('config.plugins.diffview') require('config.plugins.fzf-lua') require('config.plugins.gitsigns') diff --git a/neovim/nvim-pack-lock.json b/neovim/nvim-pack-lock.json index 335a0f8..c80ef95 100644 --- a/neovim/nvim-pack-lock.json +++ b/neovim/nvim-pack-lock.json @@ -1,5 +1,9 @@ { "plugins": { + "catppuccin": { + "rev": "edefef779ab08ce1a4a404713e3012b0d202bd35", + "src": "https://github.com/catppuccin/nvim" + }, "diffview.nvim": { "rev": "4516612fe98ff56ae0415a259ff6361a89419b0a", "src": "https://github.com/sindrets/diffview.nvim"