Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: Capture more declarations for sway autocomplete #6598

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

sdankel
Copy link
Member

@sdankel sdankel commented Sep 30, 2024

Description

I noticed that autocomplete wasn't working for some function declarations. It was because sometimes function declarations in the token map are stored as TyDecl::FunctionDecl(decl) and sometimes as TypedAstToken::TypedFunctionDeclaration(TyFunctionDecl {..})

This PR expands the matching for declarations to make autocomplete work in more cases.

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.

@sdankel sdankel marked this pull request as ready for review September 30, 2024 19:16
@sdankel sdankel requested a review from a team as a code owner September 30, 2024 19:16
@sdankel sdankel enabled auto-merge (squash) September 30, 2024 19:16
Copy link

codspeed-hq bot commented Sep 30, 2024

CodSpeed Performance Report

Merging #6598 will degrade performances by 17.08%

Comparing sophie/expand-autocomplete (50b8edd) with master (c5f363b)

Summary

❌ 1 regressions
✅ 21 untouched benchmarks

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

Benchmarks breakdown

Benchmark master sophie/expand-autocomplete Change
document_symbol 4.4 ms 5.3 ms -17.08%

@JoshuaBatty JoshuaBatty requested a review from a team October 1, 2024 00:59
@JoshuaBatty JoshuaBatty self-assigned this Oct 1, 2024
@JoshuaBatty JoshuaBatty added the language server LSP server label Oct 1, 2024
@sdankel sdankel merged commit 069ae4a into master Oct 1, 2024
41 checks passed
@sdankel sdankel deleted the sophie/expand-autocomplete branch October 1, 2024 01:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants