|
|
@ -356,6 +356,11 @@ Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'}
|
|
|
|
Packer.nvim
|
|
|
|
Packer.nvim
|
|
|
|
|
|
|
|
|
|
|
|
```lua
|
|
|
|
```lua
|
|
|
|
|
|
|
|
-- Enable packer auto reload
|
|
|
|
|
|
|
|
require("packer").init {
|
|
|
|
|
|
|
|
auto_reload_compiled = true,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
-- Create an autocmd `User PackerCompileDone` to update it every time packer is compiled
|
|
|
|
-- Create an autocmd `User PackerCompileDone` to update it every time packer is compiled
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
pattern = "PackerCompileDone",
|
|
|
|
pattern = "PackerCompileDone",
|
|
|
@ -421,17 +426,32 @@ color_overrides = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Autocmd
|
|
|
|
#### Hooks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use them to execute code at certain events. These are the ones available:
|
|
|
|
|
|
|
|
|
|
|
|
Use this to execude code after Catppuccin's been loaded:
|
|
|
|
| Autocmd | Description |
|
|
|
|
|
|
|
|
| ------------------ | ---------------------------- |
|
|
|
|
|
|
|
|
| `ColorSchemePre` | Before loading a colorscheme |
|
|
|
|
|
|
|
|
| `ColorScheme` | After loading a colorscheme |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
They can be used like so:
|
|
|
|
|
|
|
|
|
|
|
|
```lua
|
|
|
|
```lua
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
vim.api.nvim_create_autocmd("ColorSchemePre", {
|
|
|
|
pattern = "CatppuccinLoaded",
|
|
|
|
pattern = "*",
|
|
|
|
|
|
|
|
callback = function()
|
|
|
|
|
|
|
|
print "I ran before loading Catppuccin!"
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
|
|
|
|
|
|
|
pattern = "*",
|
|
|
|
callback = function()
|
|
|
|
callback = function()
|
|
|
|
local colors = require("catppuccin.palettes").get_palette()
|
|
|
|
local colors = require("catppuccin.palettes").get_palette()
|
|
|
|
-- do something with colors
|
|
|
|
-- do something with colors
|
|
|
|
end
|
|
|
|
print "ok"
|
|
|
|
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|