Code Completion Improvements in ReSharper 9
ReSharper 9.x continues to build on the radical improvements in ReSharper 8 with even more completion features and enhancements to existing ones.
Here’s what we’ve got:
- Completion filters let you take control of your search results if they get too big. The new completion filters let you fine-tune the set of results by showing a set of options below the completion list. These buttons can be toggled either using the shortcut keys or the mouse (left button adds the element, right button removes it):
The behavior of completion filters is configurable in ReSharper’s options. You can choose whether to enable or disable filters, whether to show the filter bar, and whether filter state should persist between successive invocations. It is also possible to add custom filters which can take care of special circumstances, such as collisions between identically named APIs:
- Sorting by relevance, which is a ReSharper 9.1 feature, ensures that the set of completion items you are shown have the most relevant items listed first. Also, selection no longer jumps between items while populating the completion list.
- Fuzzy matching ensures that, even if you make a mistake in an identifier, code completion results will still show the right item if it looks to be similar. Here’s an example:
- Combo returns are a novel feature useful for situations where you have a method that has to do either a
yield return. When using smart completion in a
returnstatement, ReSharper filters the list to only show the types that match the return value:
Return completion also detects the use of an
enummember that is being returned:
- Parameter info now includes ReSharper’s annotations:
This new behavior is configurable: you can elect to show all annotations, only
NotNull/CanBeNull, or hide them altogether. You can also now limit the number of signatures that are shown in the Parameter Info list:
- Double completion improvements (read this for more info on double completion) now show potentially overridable methods after
override, static members in non-static context, instance members in a static context, sealed types after typing
:in a class declaration, abstract types after typing
new, and non-partial classes after typing
- Smart completion for strings determines situations where a parameter that takes a
stringactually takes a specific range of values available elsewhere. For example, here is how ReSharper shows smart completion for a
Finally, as always, we’ve made performance improvements to the way code completion works. The completion mechanism was partially rewritten so as to make the lookup items lazy, and to ensure that only the items in the current view are rendered. This makes this whole thing faster, just so you know.
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…