For a while now, newer versions of Visual Studio have been able to display in-line information for methods, fields etc relating to how many times they may have been referenced or changed and who changed the code last. This feature is known as CodeLens.
Is there any plugin or feature in IntelliJ IDEA similar to this that would be able to display information on an individual class/field/method basis?
(22-Aug-2022 updated) The hints from git blame are also available in the latest IntelliJ IDEA.
==================
(For CodeLens function references feature) Now it's a built-in feature after version IntelliJ IDEA 2020.1.
You can enable it from:
Ref: https://blog.jetbrains.com/idea/2020/03/intellij-idea-2020-1-beta2/
There is no such plugin (yet).
You can of course right click the left gutter (gray editor to the left of the editor) and select "Annotate". That gives you at least the last edit per line.
More similar to your desired feature (but unfortunately not inline):
Select some text (e.g. a method), then right-click Git -> Show History for Selection.
Now there is JetBrains plugin named GitToolBox.
It has some similar functionality, including the current line "blame annotation" at the end of the line with detailed commit information:
This feature is available for Rider, but not for IntelliJ yet.
In Rider it's called Code Vision
You can vote for this feature request in IntelliJ IDEA here
Related
I've recently upgraded to Intellij IDEA 2017.2 and access modifier icons disappeared from my file tree... How to get them back?
UPDATE
Since 2019.2 version you can enable it in the Project view options, toggle the Show Visibility Icons:
For older versions:
This option was disabled intentionally, see this comment for the explanation:
This information was intentionally removed, as we believe that it
brings more clutter than actual value.
To enable it back add -Dide.projectView.show.visibility=true in Help | Edit Custom VM Options.
Since 2019.2 there is actually an easy to use option as described in comment:
you can find this setting in options menu of Project Tool Window. It's called "Show Visibility Icons"
I'm talking about getting the same effect you get when you commit/merge/diff and are reviewing your changes.
I would like to have code I added to be highlighted. Right now if you go under VCS, Editor Gutter and VCS annotations, both of them have Foreground disabled. I was wondering if there was a way around this.
There is an IntelliJ plugin called Git Scope that provides the functionality you are looking for.
You can install it by going to Settings > Plugin > Marketplace and searching for "Git Scope".
This is not possible without an additional plugin (see the other answer). With any plugins, your current VCS changes are shown with markers in the gutter.
I want to change the look and feel of entire Webstorm editor. How can I add more themes in the Appearance section?
As of now it lists only 2 option, Default and Darcula.
The 'Theme' dropdown in your snapshot actually refers to Look & Feel in the Intellij/Webstorm parlance. This is also seen if you try doing a View -> Quick Switch Scheme :
Notice that the options in the above correspond to the 'Themes' dropdown in your snapshot.
I would imagine that creating a new Look&Feel would be a non-trivial task. This is somewhat substantiated by https://stackoverflow.com/a/27864988/325742:
Write a plug-in to add a new LAF. Keep in mind this is a lot of work.
It took the JetBrains team a year to develop the Darcula L&F and that
was with dedicated graphic artists to create a whole suite of icons
and recommend color combinations. Since the IntelliJ IDEA Community
Edition is open source, you could use that source code to develop your
plug-in. I'm pretty sure Darcula is available in the community
edition.
Therefore, you may not find a lot of stuff out there that change the whole Look and Feel of a Jetbrains product (like IntelliJ or WebStorm).
However, the best place to look for it would be in the plugins section.
Therefore:
First option: Theme Plugins
Note that, the complete appearance of Intellij changed when I installed this, however the plugins (I tried Material Theme UI) did not appear in the dropdown list.
Second Option : https://github.com/sdvoynikov/color-themes
This is just an editor color scheme and not a full fledged L&F plugin.
Download a color theme from there, then go to File -> Import Settings and choose the downloaded file after which you should see the following:
Finally, restart Webstorm:
In WebStorm I can type something like
document.gEBI
press tab key, and it'll autocomplete to
document.getElementById()
But when I do the similar thing in IntelliJ
fmt.Prl
Auto completion doesn't work (the desired result fmt.Println()) at all, it works only if all the letters match strictly in order.
Is it possible to enable this functionality in IntelliJ? I've imported all the settings from WebStorm.
These Tab key shortcuts aren't part of the auto-complete system the Jetbrains use for all their IDEs as LazyOne says, they are actually part of the template-invocation system.
The auto-complete functionality is built into the shortcut: Ctrl+Space.
I suggest looking up the template invocation for .Println() in the settings, Jetbrains documentation, or raising a ticket with Jetbrains on YouTrack for clearer documenation/control over template-invocation.
While editing a JavaScript file, the IDE shows highlights on the lines that have problems and displays the lightbulb when you're on one of those lines.
How can I see a live list of all problems found in the current file (e.g. syntax errors)?
The only way I found so far was to manually run inspection and check the inspection window. That's quite cumbersome. Even the "Problems" section of the Project window updates itself automatically as soon as I change the code (even without saving) - but it doesn't display the actual errors (only which files have errors).
Apparently the IDE knows what errors exist in the file - I just can't find a way to see all of them in a list.
In every other IDE I know, it is a built-in, enabled-by-default, feature: eclipse, visual studio, brackets, etc.
Apparently this is an open issue on the IntelliJ family of products. Please upvote that issue if you feel it is missing as well!