From c2647ac8f10b379acd6a0c828e2147317b97013d Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sun, 20 Oct 2024 02:13:13 +0100 Subject: [PATCH] docs(README): tidy up README --- README.md | 117 +++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index d6246396..6a449c4f 100644 --- a/README.md +++ b/README.md @@ -14,49 +14,43 @@

-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 +

- +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 +## Previews
-Latte +๐ŸŒป Latte
-Frappe +๐Ÿชด Frappรฉ
-Macchiato +๐ŸŒบ Macchiato
-Mocha +๐ŸŒฟ 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 +## 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/) +- 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 [the ability to create your own!](https://github.com/catppuccin/nvim/discussions/323) +- [Compiled](https://github.com/catppuccin/nvim#Compile) configuration for [fast startup time](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) +- Support for [many other applications](https://github.com/catppuccin/catppuccin) -# Installation +## Installation [lazy.nvim](https://github.com/folke/lazy.nvim) ```lua @@ -73,7 +67,7 @@ use { "catppuccin/nvim", as = "catppuccin" } Plug 'catppuccin/nvim', { 'as': 'catppuccin' } ``` -# Usage +## Usage ```vim colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha @@ -83,7 +77,7 @@ colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchia vim.cmd.colorscheme "catppuccin" ``` -# Configuration +## Configuration There is no need to call `setup` if you don't want to change the default options and settings. @@ -141,9 +135,9 @@ require("catppuccin").setup({ vim.cmd.colorscheme "catppuccin" ``` -# Customize highlights +## Customization -## Get catppuccin colors +### Getting colors ```lua local latte = require("catppuccin.palettes").get_palette "latte" @@ -152,11 +146,11 @@ 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. +Returns a table where the key is the name of the color and the value is the hex code. -## Overwriting colors +### Overwriting colors -Colors can be overwritten using `color_overrides` in the setting, checkout https://github.com/catppuccin/nvim/discussions/323 for inspirations: +Colors can be overwritten using `color_overrides`, see https://github.com/catppuccin/nvim/discussions/323 for inspiration: ```lua require("catppuccin").setup { @@ -176,12 +170,9 @@ require("catppuccin").setup { } ``` -> [!Note] -> For more information check out our [style-guide](https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md) - -## Overwriting highlight groups +### Overwriting highlight groups -Global highlight groups can be overwritten in the setting, for example: +Global highlight groups can be overwritten, for example: ```lua require("catppuccin").setup { @@ -196,7 +187,7 @@ require("catppuccin").setup { } ``` -Per flavour highlight groups can also be overwritten in the setting, for example: +Highlight groups per flavour can also be overwritten, for example: ```lua require("catppuccin").setup { @@ -231,7 +222,7 @@ require("catppuccin").setup { } ``` -# Integrations +## Integrations Catppuccin provides theme support for other plugins in the Neovim ecosystem and extended Neovim functionality through _integrations_. @@ -261,10 +252,10 @@ require("catppuccin").setup({ }) ``` -Below is a list of supported plugins and their corresponding integration module. +Below are 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). +> If you'd like to see the full list of highlight groups modified by Catppuccin, see the [`lua/catppuccin/groups/integrations/`](https://github.com/catppuccin/nvim/tree/main/lua/catppuccin/groups/integrations) directory. @@ -368,7 +359,7 @@ beacon = false Update your bufferline config to use the Catppuccin components: > [!NOTE] -> bufferline needs to be loaded after setting up catppuccin or it will highlight incorrectly +> bufferline needs to be loaded after setting up Catppuccin or it will highlight incorrectly ```lua use "akinsho/bufferline.nvim" { @@ -429,7 +420,7 @@ coc_nvim = true, > [!Note] > coc.nvim by default link to native lsp highlight groups so config from `native_lsp` will also apply to coc -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)). +In the nested 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 = { @@ -1571,14 +1562,15 @@ which_key = false
-# Compile +## 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 pre-cached values to set it's highlights. -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: +By default, Catppuccin writes the compiled results into the system's cache +directory. See below if you'd like to change the cache directory: ```lua require("catppuccin").setup({ -- Note: On windows we replace `/` with `\` by default @@ -1586,11 +1578,11 @@ require("catppuccin").setup({ -- Note: On windows we replace `/` with `\` by def }) ``` -# FAQ +## ๐Ÿ™‹ FAQ -## Wrong treesitter highlights +### Why do my Treesitter highlights look incorrect? -Please disable `additional_vim_regex_highlighting` +Please disable `additional_vim_regex_highlighting`: ```lua require("nvim-treesitter.configs").setup { @@ -1601,32 +1593,33 @@ require("nvim-treesitter.configs").setup { } ``` -## 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, ... +### Why aren't my colors the same as the previews? -Full list of Unsupported terminals can be found here: +Catppuccin requires that your terminal supports true color, meaning that your +terminal can display the full range of 16 million colors. -### For tmux users +- Supported: iterm2 (macOS), kitty, wezterm, alacritty, [see full list...](https://github.com/termstandard/colors#truecolor-support-in-output-devices) +- Unsupported: Terminal.app (macOS), Terminus, Terminology, [see full list...](https://github.com/termstandard/colors#not-supporting-truecolor) -- [Enable true color support](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6) to fix the following [abnormal colors](https://github.com/catppuccin/nvim/issues/415): +If you use tmux, make sure to enable [true color +support](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6) +and [italic font +support](https://gist.github.com/gyribeiro/4192af1aced7a1b555df06bd3781a722). +This will prevent issues raised in +[#415](https://github.com/catppuccin/nvim/issues/415) and +[#428](https://github.com/catppuccin/nvim/issues/428). -![image](https://user-images.githubusercontent.com/1941785/220280749-c3ab52fb-9b8a-4f04-ab98-f8c1bb41f84b.png) +## ๐Ÿ’ Thanks to -- [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): +**Current Maintainer(s)** -![image](https://user-images.githubusercontent.com/13246770/224011118-dcf0f567-650a-4eb2-8be6-0af5cf435501.png) +- [vollowx](https://github.com/vollowx) -# Thanks to +**Previous Maintainer(s)** - [Pocco81](https://github.com/Pocco81) - [nullchilly](https://github.com/nullchilly) +- [mrtnvgr](https://github.com/mrtnvgr)