Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support overriding colors using vim.g.catppuccin_override_colors #165

Merged
merged 4 commits into from Jul 12, 2022
Merged

Conversation

3rd
Copy link

@3rd 3rd commented Jul 3, 2022

This PR proposes a simple way to override the palette colors by setting the global variable vim.g.catppucin_override_colors.

Usage:

  vim.g.catppuccin_flavour = "mocha"
  vim.g.catppuccin_override_colors = {
    base = "#ff0000"
  }
  vim.cmd [[colorscheme catppuccin]]

@3rd 3rd mentioned this pull request Jul 3, 2022
@sandangel
Copy link

Nice. thanks @3rd for submitting the PR.

@3rd
Copy link
Author

3rd commented Jul 3, 2022

Hey, @sandangel
No problem, should it throw an error or print a message if a key in the user provided palette doesn't exist?
Should I add some documentation about it?

@sandangel
Copy link

sandangel commented Jul 4, 2022

sorry, I'm not the owner so not really can make decision. but from an engineering perspective:

should it throw an error or print a message if a key in the user provided palette doesn't exist

I think so. Basically we should give feedback when user configure something wrong. A warning message would be better in term of user experience.

Should I add some documentation about it?

Yes. To let user know about this feature and how to use it. So they won't open a new issue for this.

Copy link

@sandangel sandangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sandangel
Copy link

sandangel commented Jul 5, 2022

hi @mainrs , could you please have a review on this PR? cc @VictorTennekes @andreasgrafen @pocco81 @ayamir @asheeeshh @ShyyLexi @WitherCubes

@mainrs
Copy link
Member

mainrs commented Jul 5, 2022

Hi! I am actually not familiar with nvim. I think one of the other contributors is better suited to review it.

@sandangel
Copy link

Oh sorry. @pocco81 @vinibispo could you help?

@vinibispo
Copy link
Collaborator

Oh sorry. @pocco81 @vinibispo could you help?

Sure

Copy link
Collaborator

@vinibispo vinibispo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works perfectly

@sandangel
Copy link

nice, can we merge the PR?

@unseen-ninja
Copy link
Member

I've been staying out of this because I'm not maintaining this whatsoever. From a technical POV I think the changes are great, but I'd prefer to have Pocco have the last word in this, as this is his baby. :D

@pocco81
Copy link
Member

pocco81 commented Jul 11, 2022

Sorry for the delay! I'm doing a rewrite of the plugin :)

pocco81 and others added 2 commits July 11, 2022 21:13
the `g:catppuccin_override_colors` variable was removed in favour of a
setting in the user's Catppuccin conf. This commit also added the
ability to change individual colors per palette and also apply changes
to all of them.
@pocco81
Copy link
Member

pocco81 commented Jul 12, 2022

from: 62856bd

feat: added color_overrides to settings

the g:catppuccin_override_colors variable was removed in favour of a
setting in the user's Catppuccin conf. This commit also added the
ability to change individual colors per palette and also apply changes
to all of them.

@pocco81 pocco81 merged commit 44496d6 into catppuccin:main Jul 12, 2022
@sandangel
Copy link

hi @pocco81 , in that case can you fix the README? I think it's still referencing the old proposal from this PR.

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.

None yet

6 participants