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

Add gruvbox dark #3948

Merged
merged 2 commits into from
Sep 28, 2022
Merged

Add gruvbox dark #3948

merged 2 commits into from
Sep 28, 2022

Conversation

svenstaro
Copy link
Contributor

@svenstaro svenstaro commented Sep 23, 2022

Uses the official gruvbox dark hard colors.

There's already gruvbox_light so let's also have gruvbox_dark. :)

To note, it would be technically more correct to rename the original gruvbox helix theme to gruvbox_dark and have this one be called gruvbox_dark_hard but eh, it would break some configs.

@CBenoit CBenoit added A-theme Area: Theme and appearence related S-waiting-on-review Status: Awaiting review from a maintainer. labels Sep 23, 2022
@pickfire
Copy link
Contributor

> cargo xtask themelint gruvbox-dark
gruvbox-dark: `ui.selection` and `ui.selection.primary` cannot be equal
gruvbox-dark: `ui.statusline.normal` and `ui.statusline.insert` cannot be equal
gruvbox-dark: `ui.statusline.normal` and `ui.statusline.select` cannot be equal
gruvbox-dark: missing `bg` for `ui.cursorline.primary`
gruvbox-dark: missing `fg` for `ui.virtual.whitespace`
gruvbox-dark: missing `fg` or `bg` for `ui.virtual.indent-guide`
gruvbox-dark: missing `fg` or `bg` for `ui.virtual.ruler`

I haven't look closely but maybe you want to resolve some of these issues? These tool is still new so it may have false positive.

@svenstaro
Copy link
Contributor Author

Ah I just copied straight from the current gruvbox theme to make it super easy to review. Should I still change it? Might be better to change all of the themes in one big linting commit.

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

See #3285. This might want to wait on #2454 since it's only a change to the palette

"ui.menu.selected" = { fg = "bg2", bg = "blue1", modifiers = ["bold"] }

"diagnostic" = { modifiers = ["underlined"] }

Copy link
Member

Choose a reason for hiding this comment

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

looks like this is missing the markup scopes

"markup.heading" = "aqua1"
"markup.bold" = { modifiers = ["bold"] }
"markup.italic" = { modifiers = ["italic"] }
"markup.link.url" = { fg = "green1", modifiers = ["underlined"] }
"markup.link.text" = "red1"
"markup.raw" = "red1"

Copy link
Contributor

Choose a reason for hiding this comment

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

@the-mikedavis I noticed you always comments on this, should we put this in the lint? cc @AlexanderBrevig

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll make a PR tonight

Copy link
Contributor

Choose a reason for hiding this comment

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

@pickfire
Copy link
Contributor

Maybe you can look if it's valid and then fix the file you added for now, I didn't check if they are valid yet, then later the original authors can probably refer to this file.

@svenstaro
Copy link
Contributor Author

So while I think that #2454 would likely be the better solution for an implementation, it shouldn't really hinder merging this particular PR even though it could be implemented more efficiently once that feature has made it in.

Can we merge in for the time being and then get rid of most of the code once the possiblity to derive a theme lands?

@AlexanderBrevig
Copy link
Contributor

AlexanderBrevig commented Sep 26, 2022

cargo xtask themelint gruvbox-dark

This will yield (with #3983):

gruvbox-dark: `ui.selection` and `ui.selection.primary` cannot be equal
gruvbox-dark: `ui.statusline.normal` and `ui.statusline.insert` cannot be equal
gruvbox-dark: `ui.statusline.normal` and `ui.statusline.select` cannot be equal
gruvbox-dark: missing `bg` for `ui.cursorline.primary`
gruvbox-dark: missing `fg` for `ui.virtual.whitespace`
gruvbox-dark: missing `fg` or `bg` for `ui.virtual.indent-guide`
gruvbox-dark: missing `fg` or `bg` for `ui.virtual.ruler`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.1`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.2`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.3`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.4`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.5`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.6`
gruvbox-dark: missing `fg` or `bg` for `markup.heading.marker`
gruvbox-dark: missing `fg` or `bg` for `markup.bold`
gruvbox-dark: missing `fg` or `bg` for `markup.italic`
gruvbox-dark: missing `fg` or `bg` for `markup.quote`
gruvbox-dark: missing `fg` or `bg` for `markup.list`
gruvbox-dark: missing `fg` or `bg` for `markup.link.label`
gruvbox-dark: missing `fg` or `bg` for `markup.link.url`
gruvbox-dark: missing `fg` or `bg` for `markup.link.text`
gruvbox-dark: missing `fg` or `bg` for `markup.raw.inline`
gruvbox-dark: missing `fg` or `bg` for `markup.raw.block`

@pickfire
Copy link
Contributor

So while I think that #2454 would likely be the better solution for an implementation, it shouldn't really hinder merging this particular PR even though it could be implemented more efficiently once that feature has made it in.

I would like to see the markup.* headers in place as specified by @the-mikedavis before merging, the original gruvbox have it.

@pickfire pickfire added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from a maintainer. labels Sep 27, 2022
@the-mikedavis
Copy link
Member

Let's call this one gruvbox_dark_hard too since it uses the dark+hard palette. We can rename gruvbox to gruvbox_dark later if we need to I suppose

@svenstaro
Copy link
Contributor Author

I synced this up with the original gruvbox theme and fixed the name.

Copy link
Contributor

@pickfire pickfire left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for contributing a theme. But do remember to add it to https://github.com/helix-editor/helix/wiki/Themes, even though we are currently looking to phase that out but it is still usable now.

@pickfire pickfire merged commit 5dbca0f into helix-editor:master Sep 28, 2022
@svenstaro svenstaro deleted the add-gruvbox-dark branch September 28, 2022 21:52
@svenstaro
Copy link
Contributor Author

@pickfire Cool, I added the theme preview to the wiki page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-theme Area: Theme and appearence related S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants