cobalt2 icon indicating copy to clipboard operation
cobalt2 copied to clipboard

Help with HTML attribute syntax highlighting

Open panphora opened this issue 5 years ago • 1 comments

Hi, I've been running into the strangest bug with the syntax highlighting of HTML attributes...

Expected behavior

HTML attributes (e.g. href, class, type) should be yellow, like in this screenshot:

Screenshot 2019-06-06 22 25 34

Actual behavior

HTML attributes are blue (i.e. #9EFFFF), just like the HTML tag names:

Screenshot 2019-06-06 22 32 04

Steps to reproduce the problem

After this bug popped up with a version of Sublime with a lot of packages and themes, I decided to start with a fresh install. So, my steps were as follows:

  1. Uninstall Sublime Text 3 (and delete the directory ~/Library/Application Support/Sublime Text 3/)
  2. Restart my computer
  3. Reinstall Sublime Text 3
  4. Add the Cobalt 2 Theme through Package Control (it's currently my only package)

These are my only custom settings:

"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"theme": "Cobalt2.sublime-theme",  

Strategies I've already tried

  • I tried modifying the cobalt2.tmTheme file manually, moving the Italic HTML attribute names definition around, removing the definition's font style, and renaming the theme itself.
  • I tried uploading the cobalt2.tmTheme file to https://tmtheme-editor.herokuapp.com/ to add an additional definition that just affects HTML attributes (i.e. entity.other.attribute-name.html). Then I used this new theme in place of the official theme. That didn't work at all. However, on the theme editor site, I was able to see what the color scheme was supposed to look like, confirming that it wasn't a general error, but perhaps something wrong with my config or version of Sublime...

Specifications

  • Version: Latest version of Cobalt 2 through Package Control
  • Platform: MacOS Mojave 10.14.2
  • Sublime: Build 3207

Getting this to work would really help me. I'm currently working on a project that requires a lot of custom data- attributes and being able to tell them apart from the rest of the code at a glance would be very nice.

Any help would be greatly appreciated!!

panphora avatar Jun 07 '19 02:06 panphora

I had to switch to a different theme in order to get HTML attribute highlighting working correctly. Any help on this would be awesome.

panphora avatar Jun 19 '19 03:06 panphora