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 html tag color #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add html tag color #16

wants to merge 2 commits into from

Conversation

aldimhr
Copy link

@aldimhr aldimhr commented Sep 17, 2021

it still doesn't support some html5 tags like < svg > and so on, so I still need to install https://github.com/othree/html5.vim

Screenshot from 2021-09-17 14-38-19

@Luxed
Copy link
Owner

Luxed commented Sep 22, 2021

To be completely honest, I'm not a fan of the colors, but looking at VSCode and Sublime Text, it seems the be the way it is done on there too.
I'll approve these changes once I've looked into it a bit more with bigger examples. I might add an option for a "legacy" mode or something like that to keep the way it is currently done.

colors/ayu.vim Outdated
Comment on lines 328 to 334
hi def htmlBold term=bold cterm=bold gui=bold
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
hi def htmlUnderline term=underline cterm=underline gui=underline
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
hi def htmlItalic term=italic cterm=italic gui=italic
Copy link
Owner

Choose a reason for hiding this comment

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

Are those needed?
From what I can see, they're already defined.

Copy link
Author

Choose a reason for hiding this comment

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

where's it located? when I install ayu without any other plugins, it doesn't show anything as defined by those codes. hm, maybe this is a problem with my terminal? I will check it again

Copy link
Owner

Choose a reason for hiding this comment

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

For me, it's defined here:
image

Copy link
Author

Choose a reason for hiding this comment

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

I agree, it looks like it needs to be removed and it is already built-in

@aldimhr
Copy link
Author

aldimhr commented Oct 2, 2021

I've removed the unnecessary code and change the color for the text inside the < a > tag

Before
Screenshot from 2021-10-02 12-43-03

After
Screenshot from 2021-10-02 12-42-45

@Luxed
Copy link
Owner

Luxed commented Oct 3, 2021

I've removed the unnecessary code and change the color for the text inside the < a > tag

Before Screenshot from 2021-10-02 12-43-03

After Screenshot from 2021-10-02 12-42-45

What is the reasoning behind this change? It seems logical to me that the contents of a Link tag would be highlighted like a link, no?
Other tags do it too, like , , (as you shown in your first screenshot). So why not ?

@aldimhr
Copy link
Author

aldimhr commented Oct 3, 2021

I think it will be confusing because it's the same color as the tag, I changed this because before I had a problem with this, other than that if I look at the Ayu theme vscode, all the text inside the tag is white. what do you think? does it need to be removed too?

call ayu#hi('htmlEndTag', 'tag', '')

" attribute
call ayu#hi('htmlArg', 'operator', '')
Copy link
Owner

Choose a reason for hiding this comment

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

Change operator to accent to be even more consistent with VSCode & Sublime Text and we're good after that!

@Luxed
Copy link
Owner

Luxed commented Oct 19, 2021

I think it will be confusing because it's the same color as the tag, I changed this because before I had a problem with this, other than that if I look at the Ayu theme vscode, all the text inside the tag is white. what do you think? does it need to be removed too?

It's all good. Apply the small change and I'll merge this!

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