Typing Assists, Code Analysis for Unused Opens, and More F# Updates in Rider
In our latest Rider 2018.3 release, we have made a number of updates to F# functionality: a bunch of new typing assists for brackets, quotes, indenting and more, code analysis for unused opens (and an optimize opens quick-fix), renaming of local symbols, updates to how Find Usages handles union cases and type specifications, and a fresh F# lexer. Let’s see!
New F# lexer implementation
Rider is the combination of the IntelliJ IDEA IDE user interface, with ReSharper running as a separate process that powers all .NET languages and features. In case you are interested in more background, we wrote an article on how the two work together.
In the latest release of Rider, we have updated the F# lexer that runs in the ReSharper process, to integrate better with existing functionality in the IDE and improve syntax highlighting and navigation for some operators.
While the lexer itself is not immediately visible, it does serve as the basis for most of the new F# features in Rider 2018.3.
Typing assists for brackets, quotes, parentheses…
The latest Rider release comes with a vast number of typing assists for F# to make the coding process more productive. For example, Rider will now auto-indent code when needed, inserts matching brackets, quotes, and parentheses, and so on.
Typing assists are available for brackets, quotes, parentheses and many more constructs. Rider will also insert newlines when needed, and update indentation.
Note: if you are interested in all situations where Rider’s typing assists will help out, have a look at our typing assist test cases.
Analyzing (and optimizing) unused opens
We’ve added a new code analysis into Rider, which checks for unused opens and comes with a corresponding quick-fix for removing unused opens. When our code does not use elements from imported namespaces, Rider will display the import declarations in gray. We can use Alt+Enter and the Remove unused opens quick-fix to remove them.
Note that the Remove unused opens quick-fix can not only be run for the current file, but also for the current folder, the current project, or our entire solution.
Renaming local symbols
While editing code, we can now rename local symbols using the Rename refactoring (Ctrl+R, R in the Visual Studio keymap). Rider will display an inline editor where we can rename the symbol, and will update the symbol name at the declaration and where it is used.
Future versions of Rider will also include support for renaming symbols across files.
Better grouping in Find Usages
Rider comes with the Find Usages action (Shift+F12 in the Visual Studio keymap), which lets us find usages of a symbol. Usages can be filtered and grouped, so we can drill down the list of usages.
With Rider 2018.3, we are adding a new group that displays usages of a symbol in pattern matching. This helps distinguish, for example, new instance creation from pattern matching:
Find Usages now also distinguishes instance creation from using a type reference, for example when doing a type check.
We would love to hear what you think of these updates! Download Rider 2018.3.1 and give it a try!
Subscribe to Blog updates
Thanks, we've got you!
Visualize Entity Framework Relationships and Additional Query Analysis in ReSharper 2023.3
A lot of teams are using Entity Framework or EF Core to work with their database. As an Object-Relational Mapper (ORM), it bridges objects in code to a relational database model, so that as a developer you don’t have to worry too much about the actual database. We all know: that’s not entirely tr…
Automatically Analyze ASP.NET Core Performance With Dynamic Program Analysis
Slow web pages may make your users or customers abandon your web application, even before they’ve had a proper look at it. You’ve likely also been frustrated working with a web application that is slow to load. The good news is that the latest versions of ReSharper and JetBrains Rider’s Dynamic P…
OSS Power-Ups: MassTransit – Webinar Recording
The recording of our webinar, OSS Power-Ups: MassTransit, with Chris Patterson, is available. This was the thirteenth 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 webinars.…
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…