Skip to main content
parmi93
Associate II
September 14, 2026
Question

STM32Cube clangd: please update the bundled clang-format (LLVM 21 -> 23)

  • September 14, 2026
  • 1 reply
  • 42 views

I would like to ask for the clangd bundle shipped with the STM32Cube clangd
extension to be rebuilt against a newer LLVM, so that it picks up the
clang-format changes released in LLVM 23.

Environment
-----------
VS Code extension : STM32Cube clangd 1.0.6
clangd bundles    : st-arm-clangd 19.1.2+st.3 and 21.1.0+st.2
                    (%LOCALAPPDATA%\stm32cube\bundles\st-arm-clangd)
Host              : Windows 11

What is missing
---------------
clang-format 23 accepts a path in `BasedOnStyle`, for example:

BasedOnStyle: InheritParentConfig=some/directory

This tells clang-format to read the .clang-format of that directory and
apply the current file on top of it. It was requested in
https://github.com/llvm/llvm-project/issues/107808 and is present in
clang-format 23.1.0. Both ST bundles still carry the older syntax only:
the string "InheritParentConfig" is in the binaries, but the "=<path>"
form is not.

The request
-----------
1. A clangd bundle built from LLVM 23 or later, so that the formatter
   understands the current .clang-format syntax.
2. If a version bump is not planned soon, an extension setting that lets
   the formatting request be delegated to an external clang-format
   executable would solve it just as well. Today the only related
   setting is stm32cube-ide-clangd.enableFormatting, which can turn the
   feature off but not redirect it, and clangd itself links clang-format
   in, so there is no way around it from our side.

As a workaround we can hand formatting to the Microsoft C/C++ extension,
whose bundled clang-format is already 23.1.0, but that means running a
second language server next to clangd, with the conflicts and the
resource cost that implies. Staying with the ST toolchain would be much
preferable.

Thank you.

1 reply

ST Employee
September 14, 2026

@parmi93 
The introduction of LLVM 23 is planned as part of the roadmap. If the content that is currently under validation progresses as usual, the update should occur at the end of November or the beginning of December.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.