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"