Features Releases

IntelliJ Scala plugin 2018.1: inline hints, better Structure View, improved refactoring, and greater usability

Meet the newly released Scala Plugin 2018.1! It’s packed with a whole variety of features, improvements and bug-fixes, and ready for download. In preparing this release for you, we’ve focused on the overall quality and UI/UX aspects, but also managed to add a couple of new interesting features. Read on to find out more.

Parameter Name Hints

If you’ve worked with Java code in IntelliJ IDEA, you’ve probably noticed the feature called “Parameter name hints”. The Scala language has a similar tool called “Named arguments” but we actually cannot completely rely on it. Sometimes developers do not use named arguments in places where they’re useful; and if you call a method from Java, you can not use named arguments at all. That’s why Inline hints are useful for Scala.

You can easily customize when to show such hints in Preferences | Editor | General | Appearance | Show parameter hints | Configure | Scala.


Type Hints

Similarly to the previous feature, the Scala plugin now supports showing inferred types. You can configure these hints by going to Preferences | Editor | General | Appearance. For example, you can ask the Editor to show result type hints only for functions, properties, or local variables, and to hide all hints with length greater than n. You can also disable type hints when the type is obvious.


Structure View improvement

The Structure View now shows you more information about code. It displays final, abstract, and access modifiers, nested definitions, primary constructor types, case class parameters as members, etc.


The Structure View also provides an option to show all inherited members with their original class. Also, we’re now displaying Scala types, not Java signatures (with “void”, etc.).

Refactoring: Inline function with parameters

Want to perform the inline refactoring for a function with parameters? You’re in luck! Thanks to our contributors from Wix, the refactoring is now capable of inlining such kind of functions. It correctly substitutes them with actual values.


Macro expansion feature update

We have made a few changes to the way macro expansion capturing works, when “-Ymacro-debug-lite” compiler option is enabled:

  • Ambiguous keyboard shortcuts have been removed and replaced with a gutter icon that expands macro right in the editor.
  • Capturing expansions is only available when using SBT-shell for building the project.

The release brings lots of other usability enhancements and bug-fixes in SBT Shell, Worksheet, Error highlighting, and Gradle support. We thank all the contributors who helped us implement them!

Your feedback is always very welcome. Please do report bugs you find, and share your ideas, in our issue tracker. Thanks!

Happy developing!

Comments below can no longer be edited.

16 Responses to IntelliJ Scala plugin 2018.1: inline hints, better Structure View, improved refactoring, and greater usability

  1. Avatar

    Bradley Smith says:

    March 27, 2018

    I just updated – it looks good but my project no longer recognizes anything scala. They show up as plain text files. Maven still works. I just get an error that the Scala Imports Organizer plugin is not loaded. Offers to enable scala, but never does. Infinite loop. Is it not supported in the community edition anymore?

    • Avatar

      Justin Kaeser says:

      March 27, 2018

      The Scala Imports organizer is a third-party plugin that hasn’t been updated since 2014 and it’s functionality is obsolete. Try disabling it completely, and be sure that the main Scala plugin is enabled.

  2. Avatar

    Bradley Smith says:

    March 27, 2018

    I removed the JB scala plugin manually (it said it was an older version – 2017.3.15), then reinstalled, and it works now.

  3. Avatar

    Josh says:

    March 27, 2018

    Thank you for the update everyone 🙂

  4. Avatar

    Matthew Maurer says:

    March 27, 2018

    I can no longer create a Scala project through: File -> New -> Project -> Scala -> sbt

  5. Avatar

    Clement Bramy says:

    March 27, 2018

    If you upgrade to IntelliJ 2018.1 you need to go to update a few plugins (including Scala plugin) otherwise it will be disabled by default and it won’t recognize your modules in existing projects and won’t let you create new SBT projects for example.

    In the IntelliJ popup click on settings and check for update, and you should be fine after a restart.

  6. Avatar

    Stephen N says:

    March 28, 2018

    I had a few issues with the upgrade. But it looks good after resolving.

    I had to manually upgrade the scala plugin, then I had to add the scala module to each of the
    14 maven modules in my project.

    • Avatar

      Nikolay Tropin says:

      March 28, 2018

      Have you tried to reimport your project from maven? Scala modules should be added automatically.

  7. Avatar

    Cedric Krause says:

    March 29, 2018

    I’m so happy to see the parameter name hints, I missed them so much.
    Now you only need to add these to rider and I’m happy af 🙂

  8. Avatar

    Oleg says:

    April 5, 2018

    There was popup when editing build.sbt with “Auto-import” turned off with buttons refresh, ignore. How to get them back?

    Also when I open build.sbt file, popup asks to import project. Now it not asks.

    • Avatar

      Anton Yalyshev says:

      April 14, 2018

      This popup was reworked to “Sticky balloon” format (happens in bottom-right corner). Please check if this notification is enabled in your IDEA (Preferences/Settings | Appearance & Behavior | Notifications | sbt Import).

  9. Avatar

    Bert says:

    April 5, 2018

    The parameter hints are nice, but the type hints are really great! A big help, especially when you try to understand old code.

  10. Avatar

    XyzVayne says:

    April 9, 2018

    Thank you for update.

    But I have a problem.
    When I rebuild, I get an error on java files.
    I am using Java & Scala together and my compile option is mixed.

    Could I get some advice?

    • Avatar

      Anton Yalyshev says:

      April 14, 2018

      Sure, but we need more information about this case. Is it possible to report this issue to our tracker? (https://youtrack.jetbrains.com/issues/SCL)
      It would be nice if you describe there a set of steps to reproduce the problem or attach a sample project that represents the issue.

  11. Avatar

    VIBHOR GARG says:

    April 20, 2018

    The plugin worked great for a week.
    Howeve, from April 20 , 2018 onwards ,it has stopped showing me the green run / debug button around objects and main class.
    I am using scala 2.11.8 ( my project ws developed last year ) and intellij is 2018.1 .

    Steps to reproduce:-
    Just create a new scala maven project from archetype – simple scala project.
    I am using Utlimate version under corporate liscense from flipkart.
    Could you pls help me here.
    I have literally crawled the entire google and no one seems to have this issue.
    Probably due to scala version or intellij upgrade ?

Discover more