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 full extended syntax #104

Merged
merged 5 commits into from
Jul 18, 2024
Merged

Conversation

jannis-baum
Copy link
Owner

Close #87

@jannis-baum jannis-baum requested a review from tuurep July 17, 2024 16:45
@jannis-baum
Copy link
Owner Author

jannis-baum commented Jul 17, 2024

Hey @tuurep I added the features that were still missing for full extended syntax support. Was super fast, the features were all added by just adding the respective plugins. I think the crux in reviewing is to check if you are okay with the stuff I wrote on the README🙈

EDIT And of course the highlight color might be a topic for u as well ^^

Copy link
Collaborator

@tuurep tuurep left a comment

Choose a reason for hiding this comment

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

Yeah looks great!

@tuurep
Copy link
Collaborator

tuurep commented Jul 17, 2024

And of course the highlight color might be a topic for u as well ^^

Inspired by seeing a PR on the iamcco repo adding the same plugin:

iamcco/markdown-preview.nvim#684

The color used in the screenshots there looks really good, and I think we could at least use the same one for light theme, and a similar for dark

image

What we currently have:

image

This is very crude and I don't like it :D

Do you agree?

However, in that PR they pretty much only added this same plugin, so I'll have to look at where the color is set, as it seems it didn't come by default with the plugin

@tuurep
Copy link
Collaborator

tuurep commented Jul 17, 2024

Fun fact/quirk:

Opening a new tab on a header anchor now adds a sort of 'selection' looking blue box around the element:

image

I'm, say, 65% sure this didn't happen before switching to using the attr plugin for this

This doesn't really matter to me but something I noticed as well.. it clears when clicking on the page

Edit:

Since I wasn't too sure, I went to double check with the current main branch. It did happen before this as well.

@jannis-baum
Copy link
Owner Author

This is very crude and I don't like it :D

Yes, definitely! I think the PR that you referenced didn't commit everything they had to get to that screenshot (the code also has a typo and wouldn't compile). Maybe they just added some opacity to the plain yellow?

@tuurep
Copy link
Collaborator

tuurep commented Jul 17, 2024

I also notice that in light theme it's the exact same color that Github has as background color in this:

image

So for light theme I think this is a good choice, it's #fff8c5

For the dark theme I'm not so sure. Do you have ideas?

image

Yellows that are dark enough look pretty much brown

Unless we flip the foreground:

image

Could be a different color too I guess, e.g.:

image

@tuurep
Copy link
Collaborator

tuurep commented Jul 17, 2024

Github's choice in a dark theme:

image

Unexpected to me 😄

Dark high contrast, where background darker, close to your theme:

image

@jannis-baum
Copy link
Owner Author

jannis-baum commented Jul 18, 2024

How about #ffffaf? That's the color I use for search matches e.g. in Vim and ripgrep with my color scheme Jellyfish.

dark mode

I think that exact same color also works surprisingly well in light mode

light mode

What do you think?

@tuurep
Copy link
Collaborator

tuurep commented Jul 18, 2024

Hmm, it's pretty good

Since I imagine it's common to mark entire paragraphs and such with ====, I wanted to see how it looks like in a larger segment:

mark-paragraph1

For light theme that actually looks great, here's the github mention color for comparison:

mark-paragraph2

This looks ok, too. But I might even slightly prefer yours.

For dark theme...

image

Ouch I think it stands out too much 😄

Do you agree however?

Also a very subtle thing: the mark fg color is #000000 by default, for light theme too, so I'd set it to #1f2328 (screenshots above have this) for light, and I'm not sure about browser-specific default differences, but maybe would be most clear to explicitly set fg #000000 on dark?

@tuurep
Copy link
Collaborator

tuurep commented Jul 18, 2024

As a very personal take, if I was actually using the dark theme, I'd probably set it something close to this for myself:

image

in case that helps with decision making, but I want it to be primarily what you want 😄

@jannis-baum
Copy link
Owner Author

Ah nice, good idea about the paragraph. I also like the ffffaf on light and yes, dark might be slightly too strong.

I was also trying out some shades of purple and blue from my color scheme which I personally really like for the marks but I was wondering if this wouldn't be too far from the conventional yellow. What do you think?

@tuurep
Copy link
Collaborator

tuurep commented Jul 18, 2024

Finding it pretty impossible to find a yellow bg for dark which looks good to me, yeah I think blue/purple is a good idea and conveys the meaning just fine as well

@jannis-baum jannis-baum force-pushed the issue/87-support-full-extended-syntax branch from c047b0f to 9eebc9e Compare July 18, 2024 15:29
@jannis-baum
Copy link
Owner Author

Actually, how about just adding some opacity? This would be the same yellow at 80% on both dark and light:

image image

Or, if we want to use colors from the syntax highlighting for dark mode, I think these would be the best options:

  1. #d7afd7 image
  2. #d0d1fe image

But I think I am slightly leaning towards keeping it simple and using the yellow at 80% for both. What's your take? After your next reply I will commit something and then merge this hahaha we're getting too deep into this :D

@tuurep
Copy link
Collaborator

tuurep commented Jul 18, 2024

Ok! We can keep yellow for both, I would say the 0.8 opacity is an improvement on dark, but would prefer 1.0 on light (the original #ffffaf).

we're getting too deep into this :D

Knowing myself I could tweak colors til the end of time so I do try to avoid bikeshedding but I think there was a need on this one :D

Hopefully the Github Alert colors will be easy on us

@jannis-baum jannis-baum force-pushed the issue/87-support-full-extended-syntax branch from 9eebc9e to 673990f Compare July 18, 2024 18:50
@jannis-baum
Copy link
Owner Author

Knowing myself I could tweak colors til the end of time so I do try to avoid bikeshedding but I think there was a need on this one :D

Haha yes, it's also nice that you put so much thought into this! Definitely helps the project

Hopefully the Github Alert colors will be easy on us

@jannis-baum jannis-baum merged commit ee962a5 into main Jul 18, 2024
6 checks passed
@jannis-baum jannis-baum deleted the issue/87-support-full-extended-syntax branch July 18, 2024 18:53
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.

Support full extended syntax
2 participants