Navigation, find usages, file structure for F# scripts in Rider 2018.1 EAP!
Our latest EAP builds of Rider 2018.1 come with a number of F# scripting updates, such as several bugfixes related to Mono, and no longer requiring MSBuild 12 to be installed. We are also bringing more ReSharper features to the world of
.fsx files: navigation in scripts, find usages and support for the file structure view. We also added code completion and navigation for
#load directives. Let’s check these out!
Navigation, find usages, file structure
Rider now supports more ReSharper features for scripts, such as navigation to symbols defined in scripts. For example, when using Search Everywhere (Ctrl+T in the Visual Studio keymap), we can see functions (and other members) from our
.fsx file are now available:
When a script is opened in the editor, we can navigate to classes, functions, variables, and other members using Go to File Member (Alt+\):
Speaking of file members: the File Structure tool window (View | Tool Windows | Structure or Ctrl+Alt+7) displays the structure of the script in the active editor tab. The File Structure view and editor tab are synchronized. We can navigate through our script using the mouse, or by typing a few characters and using the arrow keys.
Find usages (Shift+F12) and other navigation features (Alt+`) now work as well, allowing us to figure out where certain symbols are used in our script file (or referencing script files):
Code completion and navigation for
Scripts often use the
#load directives to reference assemblies or include other script files. Rider 2018.1 brings smart completion for paths in these directives. We can use regular completion and traverse the complete tree, but using Smart Completion (Ctrl+Alt+Space), Rider will suggest applicable files from subdirectories:
Features like code completion and find usages work across scripts and project. When compiling the project and referencing its output assembly in a script, we can
#r reference the assembly and get code completion for types from that assembly. What’s more: we can navigate to the type declaration, and from there find usages, mapping back to our script!
We can navigate to included files using Ctrl+click or Navigate to Declaration (F12).
Similarly, referenced assemblies are loaded in ReSharper’s index, making their symbols and members available for search and navigation, including navigation to decompiled sources using Rider’s built-in decompiler.
We’d love to hear your feedback on these updated features! Give the latest Rider 2018.1 EAP build a try!