microsoft / microsoft/vscode-cpptools

Add inlay hints to constructor calls

Open
#10,649 1 comment 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Feature: Inlay Hint Language Service Visual Studio
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Feature Request

It would be nice if inlay hints were also shown for the parameter/member names in constructors:

image

Note how inlay hints are shown for the function, but not for the normal constructor call or the aggregate initialization.

struct with_constructor
{
	int a_;
	int b_;

	with_constructor(int a, int b) : a_{a}, b_{b} {}
};

struct aggregate
{
	int a;
	int b;
};

void method(int a, int b) {}

int main()
{
	with_constructor a(1, 2);
	with_constructor b{1, 2};
	aggregate c{1, 2};
	method(1, 2);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing inlay-hint behavior for function calls in the vscode-cpptools repository, then compare it with the constructor and aggregate-initialization examples in this issue. Done means parameter or member-name hints appear for both constructor forms and aggregate initialization without regressing ordinary function-call hints.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, vscode
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.