I've seen this feature where Intellij IDEA locks the current function name as you scroll through the file. As you can see in this screen capture by the line numbers, the nested functions lock to the top while current code is down below.
What is the name of this feature and where is it in the Intellij IDEA settings?
The name of the feature is Sticky Lines and it can be found in the settings at Preferences | Editor | General | Sticky Lines
.