Skip to content

Use lifepillar/vim-colortemplate/ refact the repo#30

Open
mao-yining wants to merge 2 commits intocatppuccin:mainfrom
mao-yining:template
Open

Use lifepillar/vim-colortemplate/ refact the repo#30
mao-yining wants to merge 2 commits intocatppuccin:mainfrom
mao-yining:template

Conversation

@mao-yining
Copy link

Update with latest nvim's repo.

make some changes. waiting for catppuccin/nvim#940

@M3nny
Copy link
Member

M3nny commented Oct 11, 2025

You're doing a lot of work in order to put catppuccin in the vim colorscheme repository, and i appreciate it.
But could you explain the changes that you've made? in particular:

  • What do the catppuccin.vim files do?
  • Why there was a need to rewrite everything with vim-colortemplate? This seems unnecessary.

@M3nny M3nny self-requested a review October 11, 2025 16:43
@mao-yining
Copy link
Author

What do the catppuccin.vim files do?

provide mocha when background=dark and latte when it's light. and if you change 'background' it can change automatically.

Why there was a need to rewrite everything with vim-colortemplate? This seems unnecessary.

The present implement use vim lagacy function, it is a bit slow. And I hope to use it in 256color environment.

Furthermore, it can use one file to define all highlights and links. It is like what nvim's repo do now. So that if you want to have a change which should be added in all four themes, you only need to change once.

@M3nny
Copy link
Member

M3nny commented Oct 11, 2025

The present implement use vim lagacy function, it is a bit slow. And I hope to use it in 256color environment.

The cost for calling the function for setting the colorgroups is negligible, and it already works with truecolors.

Have you considered using our internal tool whiskers?

@mao-yining
Copy link
Author

The present implement use vim lagacy function, it is a bit slow. And I hope to use it in 256color environment.

The cost for calling the function for setting the colorgroups is negligible, and it already works with truecolors.

Have you considered using our internal tool whiskers?

Maybe I will try it in the future. It seems a bit complex. Time is late. I may try it tomorrow

@mao-yining
Copy link
Author

mao-yining commented Oct 31, 2025

I've briefly reviewed the introduction of whiskers. Here are my thoughts:

If I understand correctly, its operational model involves generating files by filling in blanks within configuration templates based on preset options.

Its primary advantage over vim-colortemplate lies in the convenient fine-tuning of colors, such as {{ green | mod(opacity=0.3) | get(key="hex") }}.

However, I believe vim-colortemplate is superior for the following reasons:

Although I'm aware that Catppuccin is specifically designed for GUI true color, Vim, being a software with significant historical legacy, requires its plugins—including this project—to support 256 colors (disregarding 16-color support for now). This is because the colors automatically generated by Vim for GUI are not entirely accurate.

There's no need to account for logic based on options like 'background', etc., which would lead to redundant workload. The current vim-colortemplate is much simpler in this regard.

The primary reason is that Vim's color configuration files differ from standard formats like JSON or YAML, leaning more towards being a programming language where all the switching logic is pre-written internally.

@M3nny
Copy link
Member

M3nny commented Oct 31, 2025

Since you're already creating a "legacy" port in the vim colorscheme repository, maybe we can use this repository as a "modern" version.

So in the future if more plugins will be added, we can use the same approach for every part of the colorscheme, without having a part done in vim-colortemplate and others in whiskers

@mao-yining
Copy link
Author

mao-yining commented Oct 31, 2025

Well, my main point is that I believe we could maintain a file that automatically switches based on the value of background. Whiskers' setup seems better suited for maintaining a single-color scheme file — though it's also possible that I haven't fully grasped how Whiskers works yet.

@mao-yining mao-yining force-pushed the template branch 2 times, most recently from 1c1720a to e5d7a35 Compare November 15, 2025 06:57
@mao-yining mao-yining marked this pull request as ready for review November 15, 2025 06:58
@mao-yining
Copy link
Author

Seems this is a complete version. Request for review and merge.

Updates will be provided should any changes arise.

@mao-yining mao-yining force-pushed the template branch 8 times, most recently from 41b25e4 to 9f9a201 Compare January 3, 2026 11:24
@mao-yining mao-yining force-pushed the template branch 2 times, most recently from ccaa15d to 9f9a201 Compare January 9, 2026 15:24
@mao-yining mao-yining force-pushed the template branch 3 times, most recently from c351a9d to 0f08f5e Compare January 23, 2026 08:48
@mao-yining
Copy link
Author

mao-yining commented Jan 23, 2026

@M3nny vim/colorschemes#286 has done, however this PR is NOT completely as catppuccin/neovim is. If you have some different idea with these changes. Please directly point it out.

@mao-yining mao-yining force-pushed the template branch 2 times, most recently from 9f9a201 to 0f08f5e Compare January 23, 2026 15:50
@mao-yining mao-yining force-pushed the template branch 2 times, most recently from a7dd095 to 3cde208 Compare January 30, 2026 05:24
Update with latest nvim's repo. Add support for 265 16 and 8 colors.

These files are color templates for each palette, used to generate color
scheme files in colors/*.vim.

Use lifepillar/vim-colortemplate to build colorschemes from templates.

Files descriptions:

* groups/init -- Load all groups
* groups/terminal				Term colors
* groups/editor -- Highlight group settings and links for Vim's internal settings.
* groups/extra -- Highlight group settings and links for plugin support.
* palettes/frappe -- Frappe palette.
* palettes/latte -- Latte palette.
* palettes/macchiato -- Macchiato palette.
* palettes/mocha -- Mocha palette.
* catppuccin.colortemplate -- Colortemplate for both light and dark backgrounds.
* catppuccin_frappe.colortemplate -- Colortemplate for Frappe (one palette).
* catppuccin_latte.colortemplate -- Colortemplate for Latte (one palette).
* catppuccin_macchiato.colortemplate -- Colortemplate for Macchiato (one palette).
* catppuccin_mocha.colortemplate -- Colortemplate for Mocha (one palette).

Here is the log of changes that rebased:

- fix: CurSearch is not well under Visual
- fix: Todo is not clear when diff
- Update cterm color mappings for Catppuccin theme
- Turn QuickFixLine in mauve
- Fix: diff, visual and statuslinenc problem
- Fix: QuickFixLine and MatchParen
- Add support for 8 colors
- Surface1 white 256
- Draft of 16 color implement
- Finish in 256
- Fix: Diff* in 256
- Fix: Spell* in term
- Fix: StatusLineNC in 256
- Remove support for plugins
- Style change
- Add: PmenuMatchSel/PmenuMatch
- rebase: master and style
- Add TitleBar and TitleBarNC
- style: noexpandtab
- feat: ALEVirtualText
- Add: LspDiag
- style: reset cc
- Add hl-dirMark
- Fix: QuickFixLine is same as Visual
- Use colortemplate regenerate 256 color
- Disable MatchParen's Background Colour
- Set lCursor Specially
- Fix: PmenuExtra
- Reverse Todo's Highlight
- Add Added/Changed/Removed
- Avoid use italic
- Add some lacked highlights
- Remake Spells' Highlight
- Add Catppuccin Theme in Draft
- Use colortemplate regenerate 256 color
- Disable MatchParen's Background Colour
- Set lCursor Specially
- Fix: PmenuExtra
- Reverse Todo's Highlight
- Add Added/Changed/Removed
- Avoid use italic
- Add some lacked highlights
- Update according to catppuccin/nvim
- Remake Spells' Highlight
- Add Catppuccin Theme in Draft

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants