chore(readme): Update compiling readme

dev
nullchilly 2 years ago
parent 55294747e2
commit 5b168e34fd

@ -317,16 +317,41 @@ Catppuccin provides these commands to work with the catppuccin compiler.
:CatppuccinClean # Delete compiled file :CatppuccinClean # Delete compiled file
``` ```
It's recommended to add `:CatppuccinCompile` to run everytime you update your config. For example: It's recommended to add `:CatppuccinCompile` to post-install/update hooks. For example:
```lua ```lua
use { use {
"catppuccin/nvim", "catppuccin/nvim",
as = "catppuccin", as = "catppuccin",
run = ":CatppuccinCompile", run = "CatppuccinCompile",
} }
``` ```
# Vim-plug
```lua
Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'}
```
To auto-compile catppuccin after `:PackerCompile`, create an autocmd `User PackerCompileDone` in User group
# Packer.nvim
```lua
vim.api.nvim_create_autocmd("User", {
pattern = "PackerCompileDone",
callback = function()
vim.cmd "CatppuccinCompile"
end,
})
```
# Vim-plug
```lua
autocmd User VimPlugDone :CatppuccinCompile
```
To auto-compile catppuccin after `:PackerCompile`, create an autocmd `PackerCompileDone` in User group To auto-compile catppuccin after `:PackerCompile`, create an autocmd `PackerCompileDone` in User group
For example, if your plugin specification is in `~/.config/nvim/lua/plugins.lua` then the pattern is `plugins.lua` For example, if your plugin specification is in `~/.config/nvim/lua/plugins.lua` then the pattern is `plugins.lua`

Loading…
Cancel
Save