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 custom matchers for completions (fuzzy search for presentation compiler) #19850

Merged
merged 6 commits into from
Apr 12, 2024

Conversation

rochala
Copy link
Contributor

@rochala rochala commented Mar 1, 2024

Fixes scalameta/metals#4656
Fixes #5507
Fixes #17706

To ensure CI output will be the same on all runners, I'm scheduling runs on all jvm versions + windows.

[test_windows_full]
[test_java8]
[test_java11]
[test_java15]
[test_java17]
[test_java18]
[test_java19]

val extMethodsInScope = termCompleter.scopeCompletions.toList.flatMap:
case (name, denots) => denots.collect:
case d: SymDenotation if d.isTerm && d.termRef.symbol.is(Extension) => (d.termRef, name.asTermName)
val termCompleter = new Completer(Mode.Term, prefix, pos, _.startsWith(prefix))

Choose a reason for hiding this comment

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

Sorry if the question doesn't make much sense, I'm not really familiar with this code, but does it mean that extension methods will be excluded from the fuzzy search? 🙂

In any case, great to see this improvement finally coming to Scala 3 completions! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is my oversight. It should also be fuzzy. Great catch 👍🏻

@rochala rochala marked this pull request as ready for review April 12, 2024 11:33
@rochala rochala requested a review from kasiaMarek April 12, 2024 11:33
@rochala rochala requested a review from kasiaMarek April 12, 2024 13:08
@rochala rochala merged commit acfc621 into scala:main Apr 12, 2024
19 checks passed
olhotak pushed a commit to dotty-staging/dotty that referenced this pull request Apr 15, 2024
…mpiler) (scala#19850)

Fixes scalameta/metals#4656
Fixes scala#5507
Fixes scala#17706

To ensure CI output will be the same on all runners, I'm scheduling runs
on all jvm versions + windows.

[test_windows_full]
[test_java8]
[test_java11]
[test_java15]
[test_java17]
[test_java18]
[test_java19]
@tgodzik tgodzik added the area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools label May 8, 2024
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur added a commit that referenced this pull request Jul 5, 2024
…mpiler) (#19850)

Fixes scalameta/metals#4656
Fixes #5507
Fixes #17706

To ensure CI output will be the same on all runners, I'm scheduling runs
on all jvm versions + windows.

[test_windows_full]
[test_java8]
[test_java11]
[test_java15]
[test_java17]
[test_java18]
[test_java19]
[Cherry-picked acfc621][modified]
WojciechMazur added a commit that referenced this pull request Jul 5, 2024
…mpiler) (#19850)

Fixes scalameta/metals#4656
Fixes #5507
Fixes #17706

To ensure CI output will be the same on all runners, I'm scheduling runs
on all jvm versions + windows.

[test_windows_full]
[test_java8]
[test_java11]
[test_java15]
[test_java17]
[test_java18]
[test_java19]
[Cherry-picked acfc621][modified]
WojciechMazur added a commit that referenced this pull request Jul 5, 2024
…ntation compiler)" to LTS (#21062)

Backports #19850 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools
Projects
None yet
5 participants