Code completion improvements in Rider 2018.2 EAP
In our latest Rider 2018.2 EAP (Early Access Preview) build, we made a number of improvements to code completion. The scoring engine from R# is now being used, resulting in better code suggestions. We’ve added code completion for scratch files, debugger watches, and C# Interactive. If you are working with unsafe code, we will replace .
with the required ->
member access operator. And of course we made some bugfixes, too. Let’s have a look!
Better code suggestion scoring
Starting with the Rider 2018.2 EAP, we are using the ReSharper statistics-based scoring algorithm to provide code completion. One of the key aspects is that Rider now keeps track of how many times a given code suggestion was used. The more a suggestion is used, the more likely it will show up in code completion.
In the following example, we’ve used Console.WriteLine()
a number of times. Code completion will start suggesting this as the first entry on the Console
type:
For many cases, this will provide better code completion than before.
Code completion for scratch files, debugger watches and C# Interactive
We’ve added code completion to several places where it would be handy to get some help from Rider: scratch files, debugger watches and C# Interactive.
Just like when writing code in a regular C# or VB.NET file, Rider provides code completion as well as method info and parameter hint popups.
Unsafe member access operator completion
C# does not allow us to use pointer arithmetic by default, to ensure type safety and security in our code base. However, we can use the unsafe
keyword to define an unsafe context where this is possible. In such unsafe context, we can work with pointers, much as we can in unmanaged languages.
To access a pointer type’s members, the ->
operator must be used instead of the .
we’re used to from regular C# code. To help our mind while writing unsafe code, Rider will detect when we use the wrong operator and when completing code, use the correct one:
Bugfixes
Several bugs and corner cases were fixed. Code completion is now available in hot spots, e.g. while using live templates. We fixed some odd code suggestions, for example when working with #region
directives.
Download Rider 2018.2 EAP now! We’d love to hear your feedback on these improvements!
Mateusz says:
August 9, 2018Any news on remote debugging? (RIDER-738)
Maarten Balliauw says:
August 9, 2018Not from my side, best keep an eye on the issue in YouTrack.
Smad says:
August 9, 20181) code completion in C# Interactive doesn’t work when i loaded assembly with namespace via “c# interactive”->”tool arguments” https://www.screencast.com/t/huwStHVl
2) 182.3944.370, 182.4129.54 stopped indexing the solution and old projects, found workaround, i added folder to index by force via explorer->Filesystem
3)182.4129.54 can’t import rider profile from 182.3944.370, just suggest create new profile.
Smad says:
August 10, 2018182.4129.110 still can’t import profile from 182.3944.370 https://www.screencast.com/t/2NSIp8wY0 (internal mode was enabled)
I don’t have acc on youtrack due to https://youtrack.jetbrains.com/issue/JT-48516
The Morning Brew - Chris Alcock » The Morning Brew #2641 says:
August 10, 2018[…] Code completion improvements in Rider 2018.2 EAP – Maarten Balliauw […]
Maarten Balliauw says:
August 10, 2018For 1), I logged an issue here: https://youtrack.jetbrains.com/issue/RIDER-18566
For 2) and 3), could you create an issue at https://youtrack.jetbrains.com/issues/RIDER#newIssue ?
Dew Drop - August 20, 2018 (#2785) - Morning Dew says:
August 20, 2018[…] Code completion improvements in Rider 2018.2 EAP and Generating a GUID in Rider, colored parameter info, custom runtime arguments in Rider 2018.2 EAP (Maarten Balliauw) […]