Have half a dozen M5Stack based devices using ESPHome. There's a big community supporting that. When I tried developing using an IDE found them more troublesome.
Tried Platform.IO?
https://platformio.org/platformio-ide
As much as I despise IDE's for embedded systems development, I've become quite a fan of the PlatformIO IDE solution .. its quite comfortable, and being able to switch to PlatformIO-CLI tooling has made for a "best of both worlds" scenario.