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

refactor: use inline completion snapshots #580

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

baszalmstra
Copy link
Collaborator

Adds completion relevance system and complete locals somewhat higher than non-locals.

Also contains some general refactors I stumbled upon along the way.

@baszalmstra baszalmstra requested a review from Wodann January 13, 2025 21:51
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 69.00585% with 53 lines in your changes missing coverage. Please review.

Project coverage is 87.62%. Comparing base (8482286) to head (33e7b0a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/mun_language_server/src/to_lsp.rs 0.00% 33 Missing ⚠️
crates/mun_hir/src/primitive_type.rs 0.00% 7 Missing ⚠️
...rates/mun_language_server/src/completion/render.rs 77.77% 4 Missing ⚠️
crates/mun_hir/src/code_model/primitive_type.rs 66.66% 3 Missing ⚠️
crates/mun_language_server/src/completion/item.rs 86.95% 3 Missing ⚠️
crates/mun_hir/src/source_analyzer.rs 0.00% 1 Missing ⚠️
crates/mun_hir/src/ty/infer.rs 0.00% 1 Missing ⚠️
crates/mun_language_server/src/handlers.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #580      +/-   ##
==========================================
- Coverage   87.71%   87.62%   -0.09%     
==========================================
  Files         273      275       +2     
  Lines       32139    32228      +89     
==========================================
+ Hits        28190    28240      +50     
- Misses       3949     3988      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Wodann Wodann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question. Otherwise LGTM!

Some(CompletionKind::Reference)
));
"#
), @r###"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the @ symbol mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a marker for insta so it knows where to place the inline snapshot.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Wodann Wodann merged commit d43f596 into mun-lang:main Feb 10, 2025
16 of 18 checks passed
@Wodann Wodann added the type: refactor Refactor existing code label Feb 10, 2025
@Wodann Wodann added this to the Mun v0.6.0 milestone Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Refactor existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants