Don't provide inlay hints when passed name == function arg name#262
Draft
evanwporter wants to merge 2 commits into
Draft
Don't provide inlay hints when passed name == function arg name#262evanwporter wants to merge 2 commits into
evanwporter wants to merge 2 commits into
Conversation
Contributor
Author
|
I'm looking at making it more efficient by not comparing the string. Also I need to add tests. |
Contributor
Author
|
alright this should be good. |
AndrewNolte
reviewed
Apr 8, 2026
|
|
||
| const auto name = def.parameters[paramIndex].name; | ||
| std::string passedArgName = paramSyntax->toString(); | ||
| ltrim(passedArgName); |
Collaborator
There was a problem hiding this comment.
We can check that it's an id token, and compare the raw text. We'd also want to check that it's not behind a macro loc as well, since there's an edge case with something like this
`def FOO bar
my_func(`FOO);
Contributor
Author
There was a problem hiding this comment.
alright I'll try and make these changes before may XD
AndrewNolte
reviewed
Apr 8, 2026
|
|
||
| const auto name = ports[portIndex]->name; | ||
| std::string passedArgName = portSyntax->toString(); | ||
| ltrim(passedArgName); |
Collaborator
There was a problem hiding this comment.
Same here, also it's sort of repeat code that can be put in a lambda
AndrewNolte
reviewed
Apr 16, 2026
| break; | ||
| } | ||
|
|
||
| const auto name = def.parameters[paramIndex].name; |
Collaborator
There was a problem hiding this comment.
We only need one paramIndex++, could be in this expr or right after.
Collaborator
|
This needs a rebase/conflict fix now |
…provide a inlay hint For example say we have a funtion: ``` function automatic logic do_something(logic a); ``` If we use this function usually the inlay hint would provide: ``` do_something(a: a); ``` Now because `a == a`. There's no hint: ``` do_something(a); ```
1532d19 to
9081e17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
if a passed arg has the name as the function argument, then we don't provide a inlay hint
For example say we have a funtion:
If we use this function usually the inlay hint would provide:
Now because
a == a. There's no hint: