Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to not have inspections and language injections in diff? Makes identical code look different

I'm using several of JetBrains' products, like IntelliJ IDEA, PyCharm and PhpStorm. One issue I'm having is that when viewing a diff codelines will look different even though they are identical.

diff1 (full image)

The lines are identical, but the rendering of them are different. That's pretty annoying, as it's hard to spot where there are actual differences.
This example can be mostly solved by turning off inspections, but that turns them off for the whole project, and I will need to constantly enable and disable it.

diff2 (full image)

In this example, there's also no differences. And there are no highlighting from inspections. But still the code is rendered differently. The comment reminded my that this is because of language injections. Turning them off makes stuff look right, but I want them when I work.

How can I make my diff become more readable and the differences easier to spot without all the clutter and without disabling everything?

like image 245
Matsemann Avatar asked Dec 20 '25 06:12

Matsemann


1 Answers

It's been possible for a while now to change this just for a diff-view. For instance when committing, one can press the cog and change Highlighting Level.

like image 135
Matsemann Avatar answered Dec 23 '25 06:12

Matsemann