https://bugs.kde.org/show_bug.cgi?id=453217
Bug ID: 453217 Summary: KDevelop not honoring .clang-format Product: kdevelop Version: 5.8.220400 Platform: openSUSE RPMs OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: All editors Assignee: kdevelop-bugs-n...@kde.org Reporter: aar...@doofus.org Target Milestone: --- Created attachment 148469 --> https://bugs.kde.org/attachment.cgi?id=148469&action=edit Failing .clang-format file SUMMARY *** I have a .clang-format file which specifies that tabs should not be used and that the indentation should be 4 spaces, however I am seeing inconsistent behavior in the editor where it either still inserts tabs or it indents by 2 spaces (or sometimes 1). *** STEPS TO REPRODUCE 1. Add the attached .clang-format file in the root directory of the project 2. Configure the project source formatter to override the editor indentation mode and select the Clang Format custom script formatter for the C language. 3. Create a new file, in my case, test.c 4. Type the following: struct test<cr> {<cr> (notice indentation is two spaces, not 4) <tab> (now at four spaces) one<tab><tab>(notice it indented one space then 2 spaces, not 4. OBSERVED RESULT The editor indents by only 2 spaces, not 4. It can be inconsistent, however. Sometimes it does indent by 4 spaces and other times I see it actually inserting a tab character and indenting by 8 instead of using spaces. EXPECTED RESULT I expect the editor to always indent to the next tab stop, i.e. 1 to 4 spaces, and always insert spaces. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: 5.93.0 Qt Version: 5.12.2 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.