pushqrdx / vscode-inline-html

🎨 Adding Syntax Highlighting, Emmet, IntelliSense support for ES6 Template Strings in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=pushqrdx.inline-html
GNU General Public License v3.0
54 stars 15 forks source link

[Suggestion] Different background color for html strings #1

Closed mariusGundersen closed 5 years ago

mariusGundersen commented 5 years ago

I have a small suggestion for a feature: show the syntax highlighted html with a slightly different background color, to make it clearer where the html string starts and stops. Not sure if this is possible though?

pushqrdx commented 5 years ago

@mariusGundersen sorry i didn't answer this more early. So the syntax colors for the html function is governed by your color scheme the extension treats html as a normal typescript/javascript function then anything between the tilde ` as html. the tilde symbol itself is treated as a string.

So altering how those are treated would result in a maybe unpleasant experience for users who expect things to behave normally.

pushqrdx commented 5 years ago

Closing this as it works are intended (by design).

pushqrdx commented 5 years ago

Actually, I am reopening this as i can definitely see what you're describing now.

pushqrdx commented 5 years ago

@mariusGundersen So I published a new version, would you give it a try and tell me if the problem persists. I guess now the extension should correctly color the tokens as follows

  1. html is treated as a function so colored like the rest of them.
  2. the tilde (`) is treated as a string so should be colored like a string.
pushqrdx commented 5 years ago

closing this as issue seems to be fixed, requester confirmation wasn't received. Feel free to reopen.