Worth mentioning as well that there's a good CLI for Arduino these days, at https://arduino.github.io/arduino-cli/latest/. It's written in Go, and shares config etc with the traditional Arduino UI. I have no affiliation with it, but have used it happily along with vim, and not needed to drop back into the traditional UI.
The VSCode environment is a huge upgrade from the stock Arduino UI and the piggybacking on the Pi as a development platform makes a ton of sense.