cancel
Showing results for 
Search instead for 
Did you mean: 

After upgrading to version 3.8.0, the code formatting function is no longer usable.

t_j_l
Associate III

After upgrading STM32CubeIDE for Visual Studio Code to version 3.8.0, the code formatting function is no longer available. Currently, while writing the code and entering ";", the formatting feature is not functioning. When saving the code, the code will not be automatically formatted; both "Format on Save" and "Format On Type" in the settings have been checked.

1 ACCEPTED SOLUTION

Accepted Solutions
r8l8pinip
Associate

It seems they've introduced a new setting for the clangd extension that controls formatting. It's disabled by default. After enabling the option, automatic formatting started working again.

Screenshot 2026-03-11 084648.png

View solution in original post

4 REPLIES 4
r8l8pinip
Associate

It seems they've introduced a new setting for the clangd extension that controls formatting. It's disabled by default. After enabling the option, automatic formatting started working again.

Screenshot 2026-03-11 084648.png

That's exactly the case.

Suess
Associate III

It tripped me up too as it wasn't very explicit in the release notes.

Thankfully, I stumbled onto this and updated our project's ".vscode/settings.json" to handle this auto-magically.

 

Cartu38 OpenDev
Lead III

@t_j_l @Suess @r8l8pinip 
Related to https://community.st.com/t5/stm32cubeide-for-visual-studio/code-formatting-style/m-p/853625#M1407

Some were complaining about formating being applied ... now you're part of the ones complaining nothing happens anymore :-).
Myself I would recommend you to setup your own formatting. VS Code marketplace is promoting collection of facilities for. Have you got a try about as example of https://marketplace.visualstudio.com/items?itemName=xaver.clang-format