Rider Plugin Development
Rider plugins are generally used to expose the functionality of a ReSharper plugin. Rider uses the IntelliJ Platform somewhat differently than other Platform-based based IDEs. Rider uses the IntelliJ Platform to provide the user interface for a C# and .NET IDE but uses ReSharper to provide the language-specific features.
IntelliJ IDEA Configuration for Rider Plugin Development
Although there is no dedicated Rider SDK, the ReSharper DevGuide addresses the subject of plugins for Rider. The documentation describes the configuration of the Gradle build script and settings.gradle file to build a Rider plugin using the Gradle build system in IntelliJ IDEA.
Developing Rider Plugins with the IDEA and ReSharper SDKs
Before starting a new Rider plugin project, review the article Writing plugins for ReSharper and Rider. In particular, this article discusses One Template to Rule Them All, a way to quickly get started writing plugins for both Rider and ReSharper.
More background information is available in the Building a .NET IDE with JetBrains Rider article, which includes a high-level description of the Rider Protocol communication process between Rider and ReSharper. The article is a good counterpoint to the ReSharper DevGuide content, which discusses the protocol at the code level.
Including Custom Settings into a Plugin
Rider plugins may introduce their own .DotSettings files with customized ReSharper settings. This is useful e.g. when a plugin brings its own file templates.
For the ReSharper part to pick these settings, the settings files should be available in the plugin JAR file under the path dotnet/Extensions/$backend-plugin-id$/settings, where backend-plugin-id
is calculated according to the following rules:
if the IntelliJ plugin id (the
<id>
element of the plugin.xml) includes a dot, thenbackend-plugin-id
is the same as the IntelliJ plugin id;otherwise, the
backend-plugin-id
is a concatenation of the IntelliJ plugin vendor name (the<vendor>
element of the plugin.xml) and the IntelliJ plugin id.
For example, for a plugin with the following plugin.xml contents, the file dotnet/Extensions/com.example.awesomeplugin/settings/templates.DotSettings would be picked up:
And the following plugin.xml would require placing the file under dotnet/Extensions/Jean-Luc Picard.Enterprise/settings/templates.DotSettings path:
Open Source Rider Plugins
It can be useful to refer to existing projects to help understand how to build plugins for Rider. The following list of plugins is all open source, and can demonstrate how to implement different functionality. Please note that the list includes ReSharper plugins as well as Rider plugins. Since a lot of Rider's language features are shared with the ReSharper engine, and since the Rider SDK includes the ReSharper SDK, then it can be useful to look at ReSharper plugins too. Also note that these plugins might not be up-to-date with the current SDK.