ESP-IDF Plugins for Eclipse 3.1.0 code formatter

elettronica67
Posts: 4
Joined: Sat Jun 08, 2024 4:40 pm

ESP-IDF Plugins for Eclipse 3.1.0 code formatter

Postby elettronica67 » Sun Nov 10, 2024 5:17 pm

Hello everyone and sorry for my basic question, unfortunately I can't set the code-formatter on an eclipse project with ESP-IDF 3.1.0 plugin.
For example I can't set the tab space to 3 spaces instead of 4. I tried to edit the ".clang-format" file in the project folder but it seems that this is not taken into account. Yet when I create a new project the editor creates automatically this file.

Furthermore I don't know how to set key binding as I want, even though I set, for example, "Next editor" for command "Ctrl+Tab", it always alternates .h file with .c file. I don't know where I'm wrong....

Below is the content of my ".clang-format" file:
  1. # We'll use defaults from the LLVM style, but with some modifications so that it's close to the CDT K&R style.
  2. BasedOnStyle: LLVM
  3. UseTab: Always
  4. IndentWidth: 3
  5. TabWidth: 3
  6. PackConstructorInitializers: NextLineOnly
  7. BreakConstructorInitializers: AfterColon
  8. IndentAccessModifiers: false
  9. AccessModifierOffset: -4
It seems that the ".clang-format" file is not taken into account at all.
Even setting these values ​​the tabulation remains 4 spaces.
Can someone help me?
Can I use native Eclipse settings instead of clang?
Thanks!

Who is online

Users browsing this forum: No registered users and 108 guests