Merge pull request #194 from nullchilly/lua

refactor(colors): Remove vimscript & Resolve dev telescope & Update auto-compile readme
dev
Pocco81 2 years ago committed by GitHub
commit cfead5ace4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -299,7 +299,7 @@ Catppuccin is a highly customizable and configurable colorscheme. This does howe
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.
To enable compile enables it in setup function:
- To enable compile enables it in setup function:
```lua
compile = {
@ -310,36 +310,54 @@ compile = {
```
By default catppuccin writes the compiled results into the system's cache directory.
Catppuccin provides these commands to work with the catppuccin compiler.
- Catppuccin provides these commands to work with the catppuccin compiler.
```bash
:CatppuccinCompile # Create/update the compile 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:
#### Packer.nvim
```lua
use {
"catppuccin/nvim",
as = "catppuccin",
run = ":CatppuccinCompile",
run = "CatppuccinCompile",
}
```
To auto-compile catppuccin after `:PackerCompile`, create an autocmd `PackerCompileDone` in User group
#### Vim-plug
```lua
Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'}
```
- To auto-compile everytime you update your config:
#### Packer.nvim
For example, if your plugin specification is in `~/.config/nvim/lua/plugins.lua` then the pattern is `plugins.lua`
Create an autocmd `User PackerCompileDone` to update it every time packer is compiled:
```lua
vim.api.nvim_create_autocmd("User PackerCompileDone", {
pattern = "plugins.lua",
vim.api.nvim_create_autocmd("User", {
pattern = "PackerCompileDone",
callback = function()
vim.cmd "CatppuccinCompile"
end,
})
```
#### Vim-plug
Auto compile on save if catppuccin config is in `init.vim`
```lua
autocmd BufWritePost init.vim :CatppuccinCompile
```
Acknowledge: [nightfox.nvim#compile](https://github.com/EdenEast/nightfox.nvim#compile)
### Extra

@ -0,0 +1 @@
require("catppuccin").load()

@ -1,3 +0,0 @@
lua << EOF
require('catppuccin').load()
EOF

@ -6,16 +6,16 @@ function M.get()
TelescopeSelectionCaret = { fg = cp.flamingo },
TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = { "bold" } },
TelescopeMatching = { fg = cp.blue },
TelescopePromptPrefix = { bg = cp.crust },
TelescopePromptNormal = { bg = cp.crust },
TelescopeResultsNormal = { bg = cp.mantle },
TelescopePreviewNormal = { bg = cp.crust },
TelescopePromptBorder = { bg = cp.crust, fg = cp.crust },
TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust },
TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust },
TelescopePromptTitle = { fg = cp.crust },
TelescopeResultsTitle = { fg = cp.text },
TelescopePreviewTitle = { fg = cp.crust },
-- TelescopePromptPrefix = { bg = cp.crust },
-- TelescopePromptNormal = { bg = cp.crust },
-- TelescopeResultsNormal = { bg = cp.mantle },
-- TelescopePreviewNormal = { bg = cp.crust },
-- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust },
-- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust },
-- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust },
-- TelescopePromptTitle = { fg = cp.crust },
-- TelescopeResultsTitle = { fg = cp.text },
-- TelescopePreviewTitle = { fg = cp.crust },
}
end

Loading…
Cancel
Save