Recently I've started a new job. So far I've been mostly writing C# for the past 10 years. Ten years ago if you wanted to write C#, you were using Visual Studio. It was the only thing that was used to write C# code (at least the only one I knew back then). There was not much space to think about any other editor. Or maybe it was only me being a bit too young to experiment with different editors. I'm not sure about that. But back then the .NET ecosystem was still young and what's more important, it was closed-source. The only choice about editor we had back then was whether we want to use ReSharper within Visual Studio or not. It was, and still is, a tool from JetBrains expanding capabilities of Visual Studio. VS always felt for me like it was a generic tool, without really good integration with .NET ecosystem. That's where JetBrains came in with their solution. They took what Microsoft did, adding a nice features, like partial fuzzy search on filenames. So when I was looking for a file named CustomerDataHandler
, I could type cgh
or CustDaHa
or something similar and ReSharper was able to find that file. It also had way more code hints than plain VS. If you wrote some foreach function doing filtering of a list, it suggested that you maybe want to shorten it to a simple .Where()
one-liner. But there were also downsides of ReSharper - it was slowing down the whole VS significantely. It was the price you had to pay for all this nice features. And some developers decided that it's not worth it. I was not one of them - I totally fell in love with ReSharper.
Let's fast-forward to today. Today I'm writing F# code in Rider, a .NET IDE from JetBrains. But since the project I'm working on is quite big and F# is still a niche, the whole experience if far from ideal. It's better than 5 years ago, but still it's quite often that the code highlight just stops working or function references do not load.
Going back from nice and cosy C# environment where the whole IDE guided me through almost everything into the dark pits of F# development where you're kind of left by yourself is sometimes hard. There are times when I feel like I would be writing some C at the university many years ago - instead of having a nice 'it seems like you forgot to close the parenthesis somewhere around this line' I get the 'AAAAAAAAAAAAAAA THIS CODE IS ALL WRONG, THERE IS SOME ERROR SOMEWHERE IN THIS FILE BUT I DONT KNOW WHERE SO I WILL UNDERLINE EVERYTHING IN RED' which is not too helpful. But this is also an opportunity. Opportunity to step back and think about my needs and wants when it comes to my code editor.
What I'm using today
The project consists of backend in F# and frontend in React. Currently I'm using at maximum 60% of Rider's capabilities (the remaining 40% is not working because it's F# not C#) for backend projects, and nvim for frontend project. I'm not fully happy about this setup since it's not convenient to switch back and forth between this two editors. I should call Rider good enough, but after I've experienced the unlimited possibilites of customizing my experience with nvim, I don't enjoy the plainness of Rider. I have vim motions plugin installed, but it's only part of the neovim experience™
. On the other hand, the amount of hours I had to put into my nvim config might be discouraging, especially at work. In my free time it's fine for me to spend 4 hours tinkering with my configs. At work it's not feasible to do it on a regular basis. I just need something that works out of the box, or at least something as close to this as possible.
Why I don't use nvim for F#
There are basically two reasons why I still stick to Rider as my main IDE: debugging and tests. I already can and do sometimes run all projects from console anyway. I have configured nvim so that I have a file tree, fuzzy find and jumping around the code using LSP so that I can go to definition or list all usages.
It is technically possible to run debugger inside nvim, but I still have something I would call a mental bareer - in Rider it just works perfectly. I would have to spend probably tens of hours trying to set up debugging and learning it, with no guarantee that I won't decide that it makes no sense and return to Rider. Especially that I've already looked into it and it seems like there are a lot of people using nvim regularly who dropped this idea of working in .NET environment in nvim because of Rider being too good out of the box.
The second problem I imagine I would have is running tests. I mean the ability to run single test from under the cursor. It should be possible to set it up in a way that I could just run the test from under cursor or in the worst case I'd just copy the name of the test I'd like to run and pass it at a parameter to console command, but hitting (CMD + TR) which just works at all times out of the box is too convenient.
Visual Studio Code
There is a middle ground between a bulky, performance-heavy editor (Rider) and configuration-heavy editor (neovim) and it's VS Code. At some point of my career I was amazed by how well vscode actually works. You want to run a python script? Just open the file, click 'yes, I want to install everything' on a popup asking if you want to run this file, and then just hit F5. At least this is my experience with vscode. It just works. But the problem I have with vscode is that it's another editor with its unique properties and shortcuts that I'd have to learn.
I was already very comfortable using mostly Rider for my daily work, with some support of vscode for some more generic and non-C# tasks. Then I've discovered neovim and decided to spend a lot of time to not only configure it, but also to learn how to use it properly. To learn unique features, find plugins, set up shortcuts and them learn them all. And the most importantly, to learn vim motions. And at the moment I'm more than happy with being fluent in nvim, but the problem with having this knowledge and skills is that I don't want to go back to the comfy, working out of the box editors where I can change only this much things and the editor's plugins list feels short.
I'm unhappy about my current editors
When I use neovim, I miss the approachability of Rider or vscode. When I use Rider, I miss the speed and lightness on nvim or vscode. When I use vscode, it all feels meh. It's the thing made of compromises. It's okay in everything but does not excel in any of my needs. Or maybe it's only my image of vscode which is untrue? But I don't feel like trying to change my mind here. I don't like vscode. Maybe it's the overwhelming amount of things that are happenig in the background? I'm not sure, right now I am unable to name it, I just don't feel like using vscode more than I have to.
I think that the reason for this whole dilemma is the fact that at some point I've decided to pick up nvim. If I wouldn't do that, I would be 'stuck' with Rider, not knowing that there is more than that. But now I know and this leads to me being lost. Maybe one day I will sit down and start tinkering with the neovim and try to set it in a way that it mimicks Rider's nicest features, at least to some extent. So that it will be good enough to replace it. Way better at some things, and just okay at others.