Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improve IntelliJ annotate (git blame)

I'd like to improve the "annotate option" (right click on code line number colon -> annotate), which is similar to git blame (but integrated to IntelliJ).

1/ Is it possible ? (via plugin or raw modification of IntelliJ files ? something else ?)
2/ I'm on Android Studio (based on IntelliJ), will it be an issue ?
3/ If 1/ & 2/ are true, any tips on how to start ?

PS : My goal is not to display some commits (like "Reformat") in the annonate because they do not provide crucial informations about code history.

like image 779
Nino DELCEY Avatar asked Mar 21 '18 09:03

Nino DELCEY


1 Answers

IntelliJ doesn't implement its own logic for handling annotations. Instead it calls out to the git's native blame command.

By default, it uses the -w flag when making the fetch, so white-space-only changes to lines will be ignored in the output. Unfortunately, these options are hard-coded in the plugin, and cannot be adjusted by the user.

A cursory search yielded no results for another plugin that would provide additional options, but you could always submit a feature request for additional annotate options.

GUI designers tend to only bother providing easy access to the features and options necessary for daily operation by developers. They assume that if you need more power, or are a maintainer, you'll use the command line, which offers a lot more options any IDE can reasonably implement a GUI for.

like image 167
LightBender Avatar answered Oct 29 '22 17:10

LightBender