# languages: Fix C/C\+\+ outline for mixed storage classes and type qualifiers \(\#46135\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8df27897e3e95daa35081ee484de4a2883f76b42

Requested commit: 8df27897e3e95daa35081ee484de4a2883f76b42

Commit: 8df27897e3e95daa35081ee484de4a2883f76b42

Tree: d1010426ec77250a7f395d1de8b8d444ac493de6

Author: ozacod

Committer: GitHub

## Message

```
languages: Fix C/C++ outline for mixed storage classes and type qualifiers (#46135)

Current tree sitter configuration for the outline was not working
correctly since the rule required a strict order, firstly
storage_class_specifier then type_qualifier. This resulted in a failure
to recognize types such as "constexpr int", "const double", etc. This PR
proposes a solution with diagnostic capture of type and storage
qualifiers which ensures full context capture and works well with C++.


Before:
<img width="924" height="365" alt="before"
src="https://github.com/user-attachments/assets/d4e0baab-b074-42fc-8a45-46c93d1d352b"
/>

After:
<img width="866" height="367" alt="after"
src="https://github.com/user-attachments/assets/0e69a4d8-fd91-44b3-bc7e-0c9e39b23d2e"
/>


Release Notes:

- Fixed outline configuration for C++ variables with complex specifiers.
```

## Parents

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

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