microsoft / microsoft/vscode-cpptools
Strip current namespace from inlay type hints
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Feature Request
The inlay type hints for auto types currently always show the full namespace like in the following example:
namespace Test {
struct Struct {};
static auto /* Test::Struct */ x = Struct{};
}
For long nested namespaces, this can quickly add up until the type becomes too long and gets shortened. In that case I can no longer see the actual interesting type name, but only the start of the namespace name, the ellipsis and the end of the type.
When working inside of the namespace, I would normally leave out the namespace when referring to the type as can be seen in the example after the assignment. It would be nice if the inlay type could also do this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation that generates C++ inlay type hints and trace how fully qualified types are formatted within nested namespaces. Done means hints shown inside a namespace omit the current namespace while still displaying the meaningful type name and preserving behavior outside that namespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100