Giter Site home page Giter Site logo

nathanpovo / resharper-fsharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains/resharper-fsharp

0.0 0.0 0.0 17.09 MB

F# support in JetBrains Rider

License: Apache License 2.0

Java 0.47% C# 26.24% F# 65.44% Kotlin 6.52% HTML 0.01% Lex 1.33%

resharper-fsharp's Introduction

F# language support in JetBrains Rider

JetBrains official project Join the chat at https://gitter.im/JetBrains/resharper-fsharp

F# support in Rider is implemented as a plugin made of two major components:

  • ReSharper.Host plugin (referred to as the backend) that adds F# support to ReSharper and is implemented in ReSharper.FSharp solution. ReSharper.Host is a modification of ReSharper used as a language service that the IntelliJ Platform interacts with. The backend is written in F# and C#.
  • IntelliJ Platform plugin for Rider (referred to as the frontend) that defines F# as a new IntelliJ Platform language but delegates most of the work to the backend. This part also adds F# Interactive support. The frontend is written in Kotlin and Java.

F# support in Rider makes use of open source software, most notably FSharp.Compiler.Service and Fantomas.

Building the plugin

Requirements

Optional

Building the plugin and launching Rider in a sandbox

  1. Install SDK and prepare backend plugin build using Gradle

    • if using IntelliJ IDEA:

      Open the rider-fsharp project in IntelliJ IDEA. When suggested to import Gradle projects, accept the suggestion: Gradle will download Rider SDK and set up all necessary dependencies. rider-fsharp uses the gradle-intellij-plugin Gradle plugin that downloads the IntelliJ Platform SDK, packs the F# plugin and installs it into a sandboxed IDE or its test shell, which allows testing the plugin in a separate environment.

      Open the Gradle tool window in IntelliJ IDEA (View | Tool Windows | Gradle), and execute the rider-fsharp/prepare task.

    • if using Gradle command line:

      $ cd ./rider-fsharp
      $ ./gradlew prepare
      
  2. Open ReSharper.FSharp.sln solution and build using the Debug configuration. The output assemblies are later copied to the frontend plugin directories by Gradle. (If you're seeing build errors in Rider, choose File | Settings | Build, Execution, Deployment | Toolset and Build, and in the Use MSBuild version drop-down, make sure that Rider uses MSBuild shipped with .NET Core SDK.)

  3. Launch Rider with the plugin installed

    • if using IntelliJ IDEA:

      Open the Gradle tool window in IntelliJ IDEA (View | Tool Windows | Gradle), and execute the intellij/runIde task. This will build the frontend, install the plugin to a sandbox, and launch Rider with the plugin.

    • if using Gradle command line:

      $ ./gradlew runIde
      

Installing to an existing Rider instance

  1. Build the Debug configuration in ReSharper.FSharp.sln.
  2. Execute the buildPlugin Gradle task.
  3. Install the plugin (rider-fsharp/build/distributions/*.zip) to your Rider installation from disk.

Contributing

We welcome contributions that address any F# plugin issues that are open in Rider's issue tracker. Some of these issues are marked as Up for grabs: we expect issues tagged this way to be easier addressed by external contributors as they are unlikely to require any changes outside the F# plugin. Note that some issues are marked as third-party problems, and addressing them requires fixes from FCS or other projects that this plugin depends on.

If you are willing to work on an issue, please leave a comment under the issue. Doing this will make sure that the team doesn't start working on the same issue, and help you get any necessary assistance.

New code is usually written in F#, except for the FSharp.Psi project that is written in C#.

As soon as you are done with changes in your fork, please open a pull request for review.

Note that the public CI server is not set up at this point but it's going to be available shortly.

We suggest that you read docs on the two SDKs that this plugin uses:

You can find some tips and tricks about the ReSharper.Host plugin (the backend) in the ReSharper.FSharp/docs folder of this repository.

Development notes

The main development branch is changed on each release (i.e. net212 correspond to 2021.2 development cycle), and builds from this branch are bundled with nightly Rider builds available via JetBrains Toolbox App.

By default, the project depends on nightly SDK builds, but a specific SDK version can be referenced in rider-fsharp/build.gradle if necessary.

Gradle downloads a newer SDK from time to time. To force an update, run the prepare --refresh-dependencies Gradle task.

To debug the backend, attach debugger to the ReSharper.Host process launched via the runIde Gradle task. To debug the frontend, start the runIde task in Debug mode.

Rider's JVM-based frontend and .NET-based backend communicate using RdProtocol with APIs available on both sides. For backend-frontend communication in plugins, RdProtocol should be used as well. Protocol model is defined in this file.

Running backend tests is not yet possible on macOS and Linux.

resharper-fsharp's People

Contributors

auduchinok avatar dedsec256 avatar reacheight avatar mfilippov avatar shalupov avatar nojaf avatar misonijnik avatar kateleiza avatar saul avatar fornever avatar kirillgla avatar rwx788 avatar dawedawe avatar ivanpashchenko avatar vasily-kirichenko avatar denis417 avatar mcon avatar yole avatar krasnotsvetov avatar xtmq avatar en3tho avatar konstantin343 avatar iliya-usov avatar seclerp avatar korifey avatar yarkoe avatar arseniicherniaev avatar dmimat avatar kashmervil avatar gorohoroh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.