Jake Wilson 6 years ago • updated 6 years ago 5
When using the Cobalt theme and editing a PHP file, the current line highlight doesn't show up for any lines of code that are between <?php and ?>.  I can see the current line highlight in the gutter for the line I'm on, but the color does not extend into the code.

If the PHP file has any HTML code integrated with it (that is obviously not between <?php and ?>) then the highlight shows up fine for the HTML.  But once you move the cursor into any PHP code, it goes away.

I'm not sure if this is a bug or if it's just poor organization of the PHP.tmLanguage file or the Cobalt theme file.  When you have PHP and HTML in the same file, all the PHP code has a different background color than the HTML code.  I'm willing to bet that the problem has something to do with this.  I've poked around in the theme files and language files, but I can't figure this one out...
Okay so I figured out in the Cobalt.tmTheme file, under the section for Embedded Source, the PHP background color is specified.  I figured that I could just add in a lineHighlight color for this section so that it forces the proper highlight color, but it doesn't seem to work.  It seems to just ignore it.
What I did was removing the embedded source settings from the theme file. I never needed a theme to tell me which bits of the code are embedded and in fact I find it rather annoying.
I can appreciate that approach, but I enjoy seeing embedded code with a different background color.

So is this a bug?
I never found a solution beyond disabling the embedded source settings from the theme file per Phalkunz solution below.  I really like seeing an alternative background color for embedded source, that doesn't really work for me.  I've just been living with it up to this point.  Wish I understood the theme file better to understand how to fix it.  I tried adding a cursor highlight color to the embedded part in the theme file but it didnt' work.