My problem is pretty much what the title says:
When I use STRG-ALT-F to format my C++ files VSC also messes with the order of #includes.
And of cause this leads to errors that were not there before…
For example this
#include "soc/soc.h" #include "soc/gpio_sig_map.h" #include "soc/i2s_reg.h" #include "soc/i2s_struct.h" #include "soc/io_mux_reg.h" #include "driver/gpio.h" #include "driver/periph_ctrl.h" #include "rom/lldesc.h" #include "XClk.h" #include "DMABuffer.h"
becomes this
#include "DMABuffer.h" #include "XClk.h" #include "driver/gpio.h" #include "driver/periph_ctrl.h" #include "rom/lldesc.h" #include "soc/gpio_sig_map.h" #include "soc/i2s_reg.h" #include "soc/i2s_struct.h" #include "soc/io_mux_reg.h" #include "soc/soc.h"
… and subsequently fails compile.
Is there a way to forbid the formatter reordering stuff?