cobalt2
cobalt2 copied to clipboard
Help with HTML attribute syntax highlighting
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:

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

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:
- Uninstall Sublime Text 3 (and delete the directory
~/Library/Application Support/Sublime Text 3/
) - Restart my computer
- Reinstall Sublime Text 3
- 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 theItalic 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!!
I had to switch to a different theme in order to get HTML attribute highlighting working correctly. Any help on this would be awesome.