{"id":558039,"date":"2025-04-16T14:05:20","date_gmt":"2025-04-16T13:05:20","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=scala&#038;p=558039"},"modified":"2025-04-17T08:16:14","modified_gmt":"2025-04-17T07:16:14","slug":"intellij-scala-plugin-2025-1-is-out","status":"publish","type":"scala","link":"https:\/\/blog.jetbrains.com\/ru\/scala\/2025\/04\/16\/intellij-scala-plugin-2025-1-is-out","title":{"rendered":"IntelliJ Scala Plugin 2025.1 Is Out!"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Support for new features in Scala 3<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Context Bounds and Givens<\/h3>\n\n\n\n<p>Scala 3.6 introduced a new syntax for context bounds and givens. You can read more about it in<a href=\"https:\/\/docs.scala-lang.org\/sips\/sips\/typeclasses-syntax.html\" target=\"_blank\" rel=\"noopener\"> SIP-64<\/a>. In short, before Scala 3.6, it was impossible to name the context bound in the same place where it was defined. The way to do it was to introduce an implicit parameter, which resulted in awkward syntax, e.g. def reduce[A](xs: List[A])(using m: Monoid[A]): A introduced the context bound Monoid[A] as m. In the new syntax, it&#8217;s possible to simply write def reduce[A: Monoid as m](xs: List[A]): A and IntelliJ IDEA with the Scala plugin recognizes it and supports it.<\/p>\n\n\n\n<p>In a similar vein, we now support the recent changes in the given syntax.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"3000\" height=\"1200\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/01_ContextBounds_BeforevsAfter.jpg\" alt=\"Three old ways to declare and name a context bound vs the new syntax\" class=\"wp-image-559849\"\/><figcaption class=\"wp-element-caption\"><em>Three old ways to declare and name a context bound vs the new syntax<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"3000\" height=\"1200\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/01_ContextBounds_MultipleAliases-1.jpg\" alt=\"Multiple context bounds\" class=\"wp-image-559861\"\/><figcaption class=\"wp-element-caption\"><em>Multiple context bounds<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"3000\" height=\"1200\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/01_ContextBounds_ForwardDeclaration-1.jpg\" alt=\"Solving an old issue of a forward declaration of a context bound\" class=\"wp-image-559873\"\/><figcaption class=\"wp-element-caption\"><em>Solving an old issue of a forward declaration of a context bound<\/em><\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Named Tuples<\/h3>\n\n\n\n<p>Scala 3.7 brings the stabilization of Named Tuples and IntelliJ IDEA 2025.1 with the Scala Plugin already supporting them. In the new release, apart from simply recognizing the syntax for Named Tuples, we also support them in pattern matching, when you can both match against a given value of one of the tuple\u2019s fields, and extract that value to a new reference. On top of that, Scala 3.7 comes with a new way to extract a field value from a case class or a class with a customized unapply method that returns a named tuple. Until now, we could either use the underscore to mark all the fields we were not interested in when calling the unapply, or we could assign a whole class instance to a reference and then access the field we wanted through that reference.&nbsp; Now, it\u2019s possible as well to simply name the fields we are interested in and assign their values to new references.<\/p>\n\n\n\n<p>You can read more about Named Tuples in <a href=\"https:\/\/docs.scala-lang.org\/sips\/named-tuples.html\" target=\"_blank\" rel=\"noopener\">SIP-58<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"3000\" height=\"1200\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/NamedTuples.jpg\" alt=\"\" class=\"wp-image-559762\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Refutable patterns in for-comprehensions<\/h3>\n\n\n\n<p>Since Scala 3.4, refutable patterns (i.e., patterns that might not match) in for-comprehensions must be preceded by the <code>case<\/code> keyword, or an error is reported. The new syntax helps recognize those cases.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/ForComprehensions1500.mp4\"><\/video><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Scala 3 improvements<\/h3>\n\n\n\n<p>The resolution of nested implicit definitions is now more precise, which means that now Scala Plugin reports some errors that weren&#8217;t caught before, while in other situations we no longer highlight code red where the code compiles just fine. The handling of intersection types used to define the \u201cself\u201d type was improved, and the support for named tuples, that we introduced recently. Besides, the Scala 3 code is now correctly highlighted in code snippets in Markdown files displayed in IntelliJ IDEA.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The debugger<\/h2>\n\n\n\n<p>We fixed a bug in Scala 2.13.3 where the debugger didn&#8217;t stop on breakpoints inside lazy vals in try\/catch blocks, and another, similar, when the debugger sometimes had trouble stopping at breakpoints inside lambdas in a trait.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/02_TheDebugger.mp4\"><\/video><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">sbt<\/h2>\n\n\n\n<p>We made several improvements to the new separate production\/test modules. A new &#8220;Generate sbt managed sources&#8221; action helps avoid situations when good code is red because it relies on sources generated during the project import. On top of that, the &#8220;New Project&#8221; wizard now suggests downloading the JDK for a new sbt project, and we don&#8217;t show anymore the banner &#8220;No Scala SDK in module&#8221; when at the same time we offer to simply load the sbt project, which will automatically setup SDK.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"3000\" height=\"1200\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/04_GenerateSbt.jpg\" alt=\"\" class=\"wp-image-559784\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Code highlighting and inlay hints<\/h2>\n\n\n\n<p>In the 2024.3 release, we introduced support for transparent inline methods in Scala 3. Now, as we continue to work on support for Scala macros, we offer support for Scala 2 macro types. Also, we improved type hints for variable patterns, generators, and literal parameters, as well as type info for underscore parameters and kind projector syntax. The X-Ray mode was enhanced as well: you can now enable parameter name hints for all parameters, not only literals, and see when the apply method is being used, instead of an ordinary constructor.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/04\/XRay1500.mp4\"><\/video><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other changes<\/h2>\n\n\n\n<p>Code completion can now provide partial results during indexing. Besides, when you use Code With Me for Scala projects, we fixed an issue when you would see that the auto-import quick-fix is offered only after code editing on the host.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>As always, your feedback is very welcome. Please report any issues you find to <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/SCL\" target=\"_blank\" rel=\"noopener\">YouTrack<\/a>. If you have any questions, feel free to ask us on <a href=\"https:\/\/discord.com\/channels\/931170831139217469\" target=\"_blank\" rel=\"noopener\">Discord<\/a>.<\/p>\n\n\n\n<p>Happy developing!<\/p>\n\n\n\n<p class=\"has-text-align-right\">The <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/1347-scala\" target=\"_blank\" rel=\"noopener\">IntelliJ Scala Plugin<\/a> team<\/p>\n","protected":false},"author":1344,"featured_media":560037,"comment_status":"closed","ping_status":"closed","template":"","categories":[89,907,8058,6945],"tags":[40,76,6836,225],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/scala\/558039"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/scala"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/types\/scala"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/users\/1344"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/comments?post=558039"}],"version-history":[{"count":9,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/scala\/558039\/revisions"}],"predecessor-version":[{"id":561892,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/scala\/558039\/revisions\/561892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/media\/560037"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/media?parent=558039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/categories?post=558039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/tags?post=558039"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ru\/wp-json\/wp\/v2\/cross-post-tag?post=558039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}