cannot get clangd-format on espressif to work

emaayan
Posts: 18
Joined: Sun Mar 05, 2023 6:16 pm

cannot get clangd-format on espressif to work

Postby emaayan » Mon Jan 13, 2025 7:55 am

hi.. I'm using .clangd-format file in the root file, and I'm mainly trying to format it without breaking lines longer than 80 chars.
not matter what i do , it's still use the default format.
my file is:


# We'll use defaults from the LLVM style, but with some modifications so that it's close to the CDT K&R style.
BasedOnStyle: LLVM
UseTab: Always
IndentWidth: 4
TabWidth: 4
PackConstructorInitializers: NextLineOnly
BreakConstructorInitializers: AfterColon
IndentAccessModifiers: false
AccessModifierOffset: -4
ColumnLimit: 200

Luxni_
Posts: 46
Joined: Mon Aug 16, 2021 6:20 am

Re: cannot get clangd-format on espressif to work

Postby Luxni_ » Mon Jan 13, 2025 8:03 am

I think it should be called ".clang-format", not ".clangd-format"

emaayan
Posts: 18
Joined: Sun Mar 05, 2023 6:16 pm

Re: cannot get clangd-format on espressif to work

Postby emaayan » Mon Jan 13, 2025 10:57 am

it is, sorry my bad, the filename is .clang-format

emaayan
Posts: 18
Joined: Sun Mar 05, 2023 6:16 pm

Re: cannot get clangd-format on espressif to work

Postby emaayan » Mon Jan 13, 2025 12:23 pm

Luxni_ wrote:
Mon Jan 13, 2025 8:03 am
I think it should be called ".clang-format", not ".clangd-format"
it was .clang-format (i mystyped) , so that's not the problem.

Luxni_
Posts: 46
Joined: Mon Aug 16, 2021 6:20 am

Re: cannot get clangd-format on espressif to work

Postby Luxni_ » Tue Jan 14, 2025 8:32 am

I tested it in https://clang-format-configurator.site/ and it worked.
maybe you forgot to add "---" in the first line of the file.

emaayan
Posts: 18
Joined: Sun Mar 05, 2023 6:16 pm

Re: cannot get clangd-format on espressif to work

Postby emaayan » Tue Jan 14, 2025 1:33 pm

even after adding the --- it still isn't applied btw, i've never created this file in the first place it's there in all samples.
i'm assuming you don't need to do anything else other RCM source->format source.

Who is online

Users browsing this forum: No registered users and 106 guests