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

Completion filtering fixes #822

Merged
merged 4 commits into from
Dec 10, 2019
Merged

Completion filtering fixes #822

merged 4 commits into from
Dec 10, 2019

Conversation

tomv564
Copy link
Contributor

@tomv564 tomv564 commented Dec 10, 2019

Testing with python language server, starting with

view|

and typing .settings() quickly, resulted in several completion requests, and the results shown when irrelevant:

Screenshot 2019-12-10 at 22 53 22

This sequence should result in only 1 completion request of which the results are never shown.

This PR

Also fixes a related issue where pressing tab would dump a huge chunk of document in the console from the inadvertently triggered on_completion_inserted logic via insert_best_completion (d06e6cd)

Pressing <tab> in documents results in huge "LSP: No match for inserted "<entire document>.." entries in the console.
…ng ahead.

If typing view.settings, completion at dot is cancelled by "s", "e" etc. even though original request is still relevant
If typing view.settings() quickly, a popup would show at the cursor offering "settings()".
In the response handler, we detect if cursor has passed a word boundary and ignore the result if so.
If there are no completion results, typing view.s would trigger requests at both '.' and 's'.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 38.485% when pulling 861b7e5 on completion-filtering-fixes into 9f44f55 on master.

@tomv564 tomv564 merged commit ed15d93 into master Dec 10, 2019
@tomv564 tomv564 deleted the completion-filtering-fixes branch January 10, 2020 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants