I also hate the Arduino IDE! Personally, I usually type in my programs using Atmel Studio and then cut/paste into Arduino to finally download and run. Not a great workflow, but I am used it it.
For a while I had Visual Micro working, but then ran into some licensing issues so abandoned it.
Here is a slightly old post on getting everything to work with Visual Studio Code…
My guess is that this would be easier now, but I have not tried. If you do try, report back if you have any problems and we’ll try to work through them. My guess is that this will end up being the best solution for most people.