Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light up Parameter Hints for Constructors and Methods #1176

Merged
merged 3 commits into from
Oct 14, 2023

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented Oct 14, 2023

WHAT

🤖 Generated by Copilot at 2ecb8f6

Enhance inlay hints for F# code by adding support for methods and tupled arguments, and improve hint logic. Refactor InlayHints.fs to avoid duplicate calls.

🤖 Generated by Copilot at 2ecb8f6

To make F# code more concise and clear
This pull request adds some hints to appear
For methods and tuples
With some clever scruples
And ShouldCreate.paramHint refactored here

🚀🛠️♻️

WHY

This lights up type hints for constructor and method parameters! More hints, more better :)

HOW

🤖 Generated by Copilot at 2ecb8f6

  • Extend condition for showing parameter hints to methods as well as constructors, based on a TODO comment (link)
  • Implement parameter hints for tupled arguments, using ArgumentLocations property of FSharpParameterLocationInfo and skipping named arguments (link)
  • Refactor ShouldCreate.paramHint function call to use a local variable and avoid duplication (link)

@baronfel baronfel changed the title uncomment code path and write more tests Light up Parameter Hints for Constructors and Methods Oct 14, 2023
This bug resulted in member/constructor hints sometimes being applied
just before the leftmost open paren.
@baronfel baronfel merged commit ad75b91 into ionide:main Oct 14, 2023
9 checks passed
@baronfel baronfel deleted the light-up-param-hints-for-ctor branch October 14, 2023 23:13
nojaf pushed a commit to nojaf/FsAutoComplete that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant