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

Add inlay hints for function parameters #6513

Merged
merged 18 commits into from
Sep 23, 2024

Conversation

JoshuaBatty
Copy link
Member

@JoshuaBatty JoshuaBatty commented Sep 9, 2024

Description

Inlay hints are now displayed in function parameter locations if a variable with the same name is not present. This should be identical to the behaviour of rust-analyzer. The inlay_hints benchmark is slower because we are now also calculating inlay hints for function_params and variable decls in the same iteration. See screen shot below for all supported types.

Screenshot 2024-09-21 at 10 47 12 AM

closes #5196

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@JoshuaBatty JoshuaBatty requested a review from a team as a code owner September 9, 2024 05:39
@JoshuaBatty JoshuaBatty self-assigned this Sep 9, 2024
@JoshuaBatty JoshuaBatty added the language server LSP server label Sep 9, 2024
@JoshuaBatty JoshuaBatty marked this pull request as draft September 9, 2024 05:40
Copy link

codspeed-hq bot commented Sep 9, 2024

CodSpeed Performance Report

Merging #6513 will degrade performances by 82.78%

Comparing josh/inlay_hints_function_params (a91181d) with master (e1546f6)

Summary

❌ 2 regressions
✅ 20 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master josh/inlay_hints_function_params Change
document_symbol 4.4 ms 5.3 ms -17.66%
inlay_hints 3.2 ms 18.6 ms -82.78%

alfiedotwtf
alfiedotwtf previously approved these changes Sep 9, 2024
@JoshuaBatty JoshuaBatty force-pushed the josh/inlay_hints_function_params branch from d2af314 to 604cf5b Compare September 19, 2024 23:47
@JoshuaBatty JoshuaBatty force-pushed the josh/inlay_hints_function_params branch 3 times, most recently from f24baf1 to aae7ad7 Compare September 21, 2024 00:50
@JoshuaBatty JoshuaBatty force-pushed the josh/inlay_hints_function_params branch from aae7ad7 to bc1f7f9 Compare September 21, 2024 01:18
@JoshuaBatty JoshuaBatty marked this pull request as ready for review September 21, 2024 03:42
@JoshuaBatty JoshuaBatty requested review from a team September 21, 2024 03:42
@IGI-111 IGI-111 enabled auto-merge (squash) September 23, 2024 06:46
@IGI-111 IGI-111 merged commit 99f11c0 into master Sep 23, 2024
37 checks passed
@IGI-111 IGI-111 deleted the josh/inlay_hints_function_params branch September 23, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add inlay hints for function parameters
3 participants