Skip to content

add html tag color#16

Open
aldimhr wants to merge 2 commits intoLuxed:masterfrom
aldimhr:htmltagcolor
Open

add html tag color#16
aldimhr wants to merge 2 commits intoLuxed:masterfrom
aldimhr:htmltagcolor

Conversation

@aldimhr
Copy link
Copy Markdown

@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
Copy Markdown
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.

Comment thread 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?

Comment thread colors/ayu.vim
call ayu#hi('htmlEndTag', 'tag', '')

" attribute
call ayu#hi('htmlArg', 'operator', '')
Copy link
Copy Markdown
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
Copy Markdown
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