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

Autocompletion does not work in 5.0.1 on Mac #485

Closed
cdaguerre opened this issue Oct 8, 2019 · 5 comments
Closed

Autocompletion does not work in 5.0.1 on Mac #485

cdaguerre opened this issue Oct 8, 2019 · 5 comments

Comments

@cdaguerre
Copy link

Autocomplete functionality seems broken on Mac since 5.0.0
I tried removing and reinstalling the package, removing the project definition, database, re-indexing, restarting Atom multiple times, but it doesn't help.
Goto-definition works fine, but there are no suggestions when I start typing a class name and no error message in console (although all levels are displayed).
I'd love to contribute a fix but I have no idea where to look...

@cdaguerre
Copy link
Author

Commentling this line fixes it:

request.prefix = '';

@cdaguerre cdaguerre changed the title Aucompletion does not work in 5.0.1 on Mac Autocompletion does not work in 5.0.1 on Mac Oct 8, 2019
@madrussa
Copy link

madrussa commented Oct 8, 2019

Confirmed not working for me as well, Atom 1.40.1, Serenata 5.0.1. I also done the same things as re-indexing etc...

Might be a while until we see a fix as the issue @Gert-dev found, which appears to be why the prefix was applied, is still outstanding with Atom since May 2018. (atom/atom-languageclient#218).

@cdaguerre Thanks for the temporary fix, works for me too! I will suffer the illogical ordering/priority whilst a real solution can be found.

@Gert-dev
Copy link
Owner

Gert-dev commented Oct 8, 2019

This is indeed unfortunate. The line request.prefix is already a workaround for another issue, already linked by @madrussa.

The gist is that, the server currently returns filtered and sorted results (as you would expect), but without this line, the client (Atom via the used atom-languageclient library) does another round of fuzzy matching on top of that.

This additional round of filtering was sometimes dropping valid results returned by the server and messed up the sorting order of the returned results. Faking that the prefix is empty skips that additional filtering and sorting in the atom-languageclient library, which is why I added it.

As mentioned in the linked issue, the autocomplete-plus API of old supports disabling this automatic filtering (filterSuggestions), but atom-languageclient does not obey this setting.

If you want to contribute, I think it would be best to contribute a fix to atom-languageclient that reads out this filterSuggestions option and skips the filtering if it is set and true.

The only question is when it will be merged, as the project doesn't seem particularly active anymore - neither does Atom itself, for that matter 🙁.

@Jamie-Vandenbalck
Copy link

@Gert-dev Is there already a solution or workaround for this known problem?

@machitgarha
Copy link
Collaborator

@Gert-dev It seems this issue should be closed as well.

@Gert-dev Gert-dev closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants