Skip to content

Fix indentations for expressions in C/C++ - #58740

Merged
ChristopherBiscardi merged 2 commits into
zed-industries:mainfrom
Helmutt03:cpp-indents
Jun 9, 2026
Merged

Fix indentations for expressions in C/C++#58740
ChristopherBiscardi merged 2 commits into
zed-industries:mainfrom
Helmutt03:cpp-indents

Conversation

@Helmutt03

@Helmutt03 Helmutt03 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Indentations are not correctly handled for expressions in C/C++. To fix this i have updated indents.scm for both C/C++, there could be more languages which have this problem but i have only noticed it in these languages.

Current indentation behaviour:

Skarminspelning.2026-06-06.kl.15.04.58.mov

Expected indentation behaviour:

Skarminspelning.2026-06-06.kl.15.06.44.mov

Release Notes:

  • Improved indentation for C/C++ to be more consistent.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 6, 2026
@maxdeviant maxdeviant changed the title Fixed indentations for expressions in C/C++ Fix indentations for expressions in C/C++ Jun 6, 2026
@ChristopherBiscardi ChristopherBiscardi added area:languages/c++ C++ programming language support area:languages/c C programming language support labels Jun 9, 2026

@ChristopherBiscardi ChristopherBiscardi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, thanks!

@ChristopherBiscardi
ChristopherBiscardi added this pull request to the merge queue Jun 9, 2026
Merged via the queue into zed-industries:main with commit 308a106 Jun 9, 2026
32 checks passed
@ChristopherBiscardi ChristopherBiscardi self-assigned this Jun 9, 2026
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
Indentations are not correctly handled for expressions in C/C++. To fix
this i have updated indents.scm for both C/C++, there could be more
languages which have this problem but i have only noticed it in these
languages.

Current indentation behaviour:


https://github.com/user-attachments/assets/2804d3a6-2dde-484b-b1f4-0a867801bc0c

Expected indentation behaviour:


https://github.com/user-attachments/assets/b1ebe840-7391-4f5d-bfe0-87d413f5dfe2

Release Notes:

- Improved indentation for C/C++ to be more consistent.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Indentations are not correctly handled for expressions in C/C++. To fix
this i have updated indents.scm for both C/C++, there could be more
languages which have this problem but i have only noticed it in these
languages.

Current indentation behaviour:


https://github.com/user-attachments/assets/2804d3a6-2dde-484b-b1f4-0a867801bc0c

Expected indentation behaviour:


https://github.com/user-attachments/assets/b1ebe840-7391-4f5d-bfe0-87d413f5dfe2

Release Notes:

- Improved indentation for C/C++ to be more consistent.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:languages/c++ C++ programming language support area:languages/c C programming language support cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants