3

I don't like this highlight: enter image description here

Can you help me to disable it?

I've tried Editor -> Color Scheme, also Editor -> Inspections ... no success.

BTW, how can I change the highlight color of matched variables?

1 Answer 1

12

This happens because of the br tag at the end of the string; PHPStorm considers the string to be some HTML markup and will apply any HTML styling to it. The background color change is the IDE's way of telling you "oh hey, this is in a different language than the one specified in the file extension of the current file".

To fix it, go in Settings > Editor > Color Scheme > General then extend the Code list, and click on Injected language fragment. From there you can uncheck the Background checkbox to remove the coloring, or choose any other color you like.

Edit: to change the highlight color of matched variables, go in Identifier under caret options in the same menu (there's two of them)

7
  • Thank you very much! This helped! Can you also help me with second question? When I click on a variable, the matched variables are highlighted, I want to change the way how they are highlighted. Thanks again!
    – Denis Monn
    Commented Aug 8, 2017 at 9:25
  • 1
    No problem, I have edited the answer to include the "matched variables" highlight options Commented Aug 8, 2017 at 11:56
  • Nice... Thank you!
    – Denis Monn
    Commented Aug 9, 2017 at 9:29
  • I'm sorry, I have another dislike: prntscr.com/g6fays Some notifications (second one) are not useful and I can't disable them. Can you help again? Thanks!
    – Denis Monn
    Commented Aug 9, 2017 at 16:52
  • 1
    @DenisMonn you can set how each type of notification in Appearance & Behavior > Notifications. I won't edit the answer to include this information as it is out of scope of the original question. Commented Aug 9, 2017 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.