Switching from Arduino to espidf

Hi everyone, I’m new to Platformio.
I created a project with Arduino and arduino-esp32 core on idf 4.4.0, I tried porting it to the platform with the Arduino framework and everything works perfectly!
Now I would like to start gradually untying myself from the Arduino framework… My idea is to create a project with espidf framework and import Arduino as a normal library obviously already removing setup() and loop() from the start and putting app_main() in your opinion is possible?