Arduino IDE Enhancement - use project local Preferences.txt

I’m currently developing a system on the Arduino IDE that uses 2 projects, 1 for an ESP32 and 1 for a STM32. This works well as I can have both open at the same time. However, every time I reopen a project I have to change the board type settings accordingly (the STM32 requires sub-board type, USB settings etc… as well).

Can the IDE be changed such that the board type (and other Preferences) are saved with the local project. E.g. a ‘Preferences.txt’ is saved within the local project folder. On reopening the project, the main Preferences.txt file can be loaded with the defaults, then (if it exists) the local one is loaded to override these settings. The correct preferences would then be set for each project.