-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feature: allow disabling of autocompletion-related limits via configuration #13564
Comments
I can certainly see us have a setting that reflects the limit, allowing users to bump it up if they so desire/
This limit is in place because calculating import completions for less characters is incredibly expensive and finds way too many results which isn't too useful. I am doubtful that removing that limit via a config will benefit anyone.
This will cause completions to be missed out in certain scenarios. For one assuming the |
I don't know how common situations like this occur for everyone, but as an example, I had to search the documentation instead of viewing the autocomplete. Specifically, when implementing error handling using |
My previous points still stand, we can't lift the current limits as rust-analyzer is generally too slow for these. I've also changed my mind on the config for the limit as the same applies there, we can bump the limit incrementally once we made progress with the perf of completions, but until then I personally don't want to change it. |
I currently maintain a branch that has the autocompletion-related limits disabled. See https://github.com/danielhuang/rust-analyzer/tree/completion2.
Specifically, the changes are:
DEFAULT_QUERY_SEARCH_LIMIT
to 400000 (from the original 40)fuzzy_name_length
(automatic imports will be found immediately, even without 3 characters already typed)is_incomplete
tofalse
to prevent rust-analyzer from recomputing the completions when typing another characterNote: The branch also contains #11667 (which was closed).
Overall, these changes provide a more consistent experience for those using the forked branch, by removing the surprise factor when new items suddenly appear when typing that were previously shown to not be available, and removes the delay before the new autocompletion popup appears.
The default behavior (in a large project):
Screencast.from.2022-11-06.16-07-04.mov
With changes (in the same project):
Screencast.from.2022-11-06.16-11-05.mov
It would be nice if this was configurable without using the fork.
The text was updated successfully, but these errors were encountered: