# Language: Fix minor C\+\+ completion label formatting issue \(\#41544\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/344f63c6cadef985cea86b9ea16d9440ace54a6e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 344f63c6cadef985cea86b9ea16d9440ace54a6e

Requested commit: 344f63c6cadef985cea86b9ea16d9440ace54a6e

Commit: 344f63c6cadef985cea86b9ea16d9440ace54a6e

Tree: a9fda11a4a8107c8f2f0f35f938c50d5d970aef0

Author: A\. Teo Welton

Committer: GitHub

## Message

```
Language: Fix minor C++ completion label formatting issue (#41544)

Closes #39515

**Details:**
- Improved logic for formatting completion labels, as some (such as
`namespace`) were missing space characters.
- Added extra logic as per stale PR #39533
[comment](https://github.com/zed-industries/zed/pull/39533#issuecomment-3368549433)
ensuring that cases where extra spaces are not necessary (such as
functions) are not affected
- I will note, I was not able to figure out how to fix the coloring of
`namespace` within completion labels as mentioned in that comment, if
someone would provide me with direction I would be happy to look into
that too.

Previous:
<img width="812" height="530" alt="previous"
src="https://github.com/user-attachments/assets/b38f1590-ca2d-489d-9dcb-2d478eb6ed03"
/>

Fixed:
<img width="812" height="530" alt="fixed"
src="https://github.com/user-attachments/assets/020b151d-e5d9-467e-99c1-5b0cab057169"
/>


Release Notes:

- Fixed minor issue where some `clangd` labels would be missing a space
in formatting
```

## Parents

- [e30d5998e47eaeb8915e6ab59a0381a9c622c52b](https://git.cafe/gitcafe/zed/commit/e30d5998e47eaeb8915e6ab59a0381a9c622c52b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/344f63c6cadef985cea86b9ea16d9440ace54a6e?format=markdown)
