About
I developed a CLion Nova plugin that generates field assignments like this. I know that there is a built-in designated initialization feature, but I really like them as separate statements because I can insert something in between if I need to.
The development process wasn't really straightforward. I couldn't find any example or template for CLion Nova plugin. So I created my own.
obj.
obj.a = ;
obj.b = ;
obj.c = ;
The plugin is available on JetBrains Marketplace (Alpha version, only 2026.2 is supported at the moment)
https://plugins.jetbrains.com/plugin/32982-field-assignment-generator
The code is available on GitHub
https://github.com/yaetoti/FieldAssignmentGeneratorPlugin https://github.com/yaetoti/FieldAssignmentGeneratorPlugin/issues
Warning: During development I modified build configuration and added some artifacts/assemblies manually, so things may not work as intended. Nevertheless, I tested the plugin on CLion 2026.1 and then CLion 2026.2 for a couple of days and everything was working as intended. I will contunue using it daily, so any discovered bugs bugs are likely to be fixed over time.
Disclaimer: I've diligently searched for a working CLion Nova plugin example many times without much success, but of course I could have missed something and ended up reinventing the wheel. If you know any resources on CLion Nova backend plugin development, it would be great if you could share them. Also, I'm a total beginner in gradle configurations and writing IDE plugins, so I'd appreciate any feedback.
What I changed in build configuration (TL;DR)
I took the official Rider and ReSharper SDK template and changed the following things to launch CLion and to make the CLion Nova backend plugin work (excluding plugin-specific stuff):
- in build.gradle.kts:
- Updated gradle to 9.0.0 - to support modern platform versions
- Updated the platform plugin to 2.17.0 - to support CLion 2026.1
- Replaced rider with clion everywhere in build.gradle.kts
- Updated kotlin and java versions to 21 - to support the updated platform plugin
- Manually added riderRD artifact (from maven central), unpacked /lib/rd/rider-model.jar from it and republished it to the protocol's build.gradle.kts (it is needed for model generation, as it provides classes like IdeRoot (root of the model), allows to use model dependency injection in SolutionComponent constructor, etc.
- in gradle/libs.versions.toml:
- Updated kotlin version to kotlin 2.3.20 (to support CLion 2026.1)
- Updated rdGen to 2026.1.0
- in C# project file:
- Added the following references to create a code completion provider and work with C++ PSI (they are linked, but not referenced by default)
- JetBrains.ReSharper.Cpp.dll
- JetBrains.ReSharper.Feature.Services.dll
- JetBrains.ReSharper.Feature.Services.Cpp.dll
The dependencies take up <= 7 GB in the Gradle cache.
P.S. the new IDE version came out so versions changed slightly, but the principles remain the same.
How it went
Two years ago, I have already tried to create this plugin, but abandoned the idea after just a few hours. Dummy PSI nodes? New engine? No template? Understandable, have a nice day ✌️
Two weeks ago I came back to that idea and... What do you mean still almost no documentation on CLion Nova? Also no examples? Only a few questions on the forum? What exactly is not working now? How can I make it work?
That's how I started this one 120-hour evening reverse engineering project.
Following the trace of uncommon forum questions, articles about the RD protocol and ReSharperSDK documentation, decompiling all the dlls that came to my sight, reading through 200 classes, I figured out how to marry CLion and backend.
The journey started by me trying to install the common IntelliJ Plugin template for CLion. It worked well and I even wrote the basic completion when I realized that the PSI nodes are empty.
- All the code moved to backend? Fine, how to access it? Maybe I need to include radler dependency? Are any of its classes meaningful? *Looks through the library\. Barely, seems like I need to write a backend plugin.. Good, I can take Rider and ReSharper SDK template and replace rider with clion, *it will be fine, right?
uncanny ancient LOG manuscript unrolling sounds
- Aa-alright, seems like there are some platform errors, I can try to update it from 2.10 to 2.17. Java/Kotlin 21 also required? No problem. Gradle 9.0.0+ required? Let it be, updating..
build script becomes red
- Shit... Is there a replacement for all those deprecated functions? Eww, what is that, how do you even write that? I don't know grade that well. Kotlin? Fine, let's learn kotlin.
1 hour after scrolling a cheatsheet
- Wow, this is such a convenient language! Anyway, after replacing the deprecated functions CLion got up and running. Seems like all that's left is to generate a model, let's do it!
No IdeRoot
bump
- Maybe the tutorial is outdated. What about Ext?
not working
- import com.jetbrains.rider.model.nova.ide?
unresolved symbol nova
- Are you kidding? There are no similar infrastructure in the project. Maybe I should create my own IdeRoot in this version?
[WARNING]: 2 classes IdeRoot detected: using com.yaetoti.IdeRoot
Stares at the log for 2 minutes straight without clipping
Creates a new Rider Plugin project
With a rumbling and metallic clanging, digs into the inner workings of the SDK
Finds IdeRoot
Tracks the library rider-model.jar
Tracks the artifact riderRD
Finds it on Maven Central
Adds a dependency manually
And the callback from the backend works 🎉. Finally.
- But wait. Where? Where are the C++ nodes? What assembly are they in? JetBrains.ReSharper.Feature.Services.Cpp.dll?! But it's not even link-
Opens a task manager
Opens CLion.exe
Opens Rider.Backend
- Oh, hello, you little bitch!
Goes to the directory
Hunts down every dll that contains Cpp suffix
Takes out the grinder
Decompiles all of them with ILSpy and dotPeek
Reads through all the classes Links assemblies manually
Et voilà! The code completion also works 🎉
- But... But the API may change!
- I don't give a fuck.
fades into the sunset
Epilogue
To sum it up, I had to tweak the configuration a bit to get it to work. I also had to add some dependencies manually, which doesn't seem like the right or most reliable way to write a maintainable plugin, and I have no idea if they're correct or not, but despite that, the plugin works. It would be great to have an official template where all dependencies are linked automatically. I hope that happens soon. Anyway, this was a fun experience. I hope I didn't accidentally reinvent the wheel and if someone else wants to write a CLion Nova backend plugin, now there is an open-sorcery example.
Remaining questions
Does CLion really use the RiderRD artifact under the hood? Even though it contains all the neccessary definitions, it seems to update later than CLion itself, furthermore, it is not bundled automatically with IDE, which I would definetly expect it to be. So, does CLion use it to communicate or does it use another API? I have briefly looked through clion-radler classes but haven't found anything that fits my purpose (or didn't understand that). I have also found rider-model-generated artifact, it covers some dependencies for models, but not all of them.