RubyMine 2022.3 Beta2: Improved Writing Methods Process and Updated Documentation Tool Window
Our Early Access Program is coming to an end, and we are happy to announce that RubyMine 2022.3 Beta 2 is now available!
We invite you to download it and share your feedback via our issue tracker or in the comments below.
Here are some of the features in the upcoming release that we have not presented to you yet.
Improved editing and adding method signatures to Ruby method definitions
In RubyMine 2022.3, we have simplified the process of writing methods with type signatures.
You can learn more about RBS support in this article. There is no longer any need to switch between multiple files, Ruby, and RBS, just to write one method definition. We’ve implemented an easy way to edit and add new type signatures.
To edit type signatures, you can use the quick-fix available for the Mismatched Type inspection or an intention action on the declaration’s name in a Ruby file.
If a type signature is missing, you can add it using the quick-fix for the Missing Type Signature inspection.
The actions of editing and adding type signatures are both only applicable to declarations that actually have types. This includes methods, attributes, instance/class variables, global variables, constants, and method aliases. These actions are unavailable for classes and modules as these do not have type signatures directly themselves.
The feature will open the type signature file in a new tab and begin a live template on all of the type signature elements. In case of overloaded methods, one template per overload will be opened and you are able to tab between them.
Upon completing the live template, you will be taken back to where you were in the Ruby code. The interaction is smooth and unobtrusive to your work. You can easily edit signatures without you having to manage multiple files yourself.
Showing info from RBS in Documentation Tool Window
We’ve added the ability to view type information from RBS using the Quick Documentation popup (Ctrl+Q). Now, if the method is described in RBS, RubyMine will display information about the parameters and return value in the documentation.
Regarding type variables, they show up as the type variable name (e.g. public method #foo(a <- T)) when the action is invoked on the method definition and as the parameter type when it’s invoked on a call.
Overloads are represented not as a union of proc signatures but as one proc signature with a union for each parameter type and return type whenever applicable.
To view Quick Documentation in a popup, just hover the mouse over the necessary symbol in the editor, place the caret at the symbol and press Ctrl+Q (View | Quick Documentation).
With the default settings, pressing Ctrl+Q (View | Quick Documentation) opens quick documentation in a popup.
Support for the .dockerignore file type
We’ve introduced full support for .dockerignore files, including code highlighting and completion. These files are now taken into account when you build an image from the IDE.
Join the Early Access Program
You can download RubyMine 2022.3 Beta 2 from our website or via the Toolbox app. The full list of improvements in this Beta version is available in the release notes.
To learn about the newest features as they come out, follow RubyMine on Twitter. We post product news and tips several times a week.
We encourage you to share your thoughts in the comments below and to suggestcreate and vote for new features in the issue tracker.
Happy developing!
The RubyMine team