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
Adds rank to ICompletionProvider #14800
Conversation
Thanks for making a pull request to jupyterlab! |
* priority to your provider, use a rank of 1000 or above. | ||
* | ||
* The rank is optional for backwards compatibility. If the rank is `undefined`, | ||
* it will assign a rank of [1, 499] making the provider available but with a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this limit implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the upper limit is not implemented, but you need 49 providers to reach a rank of 500.
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hbcarlos
I would wait before merging so @krassowski can have another look at this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failing tests is relevant:
jupyterlab › test/jupyterlab/completer.test.ts:85:9 › Completer › Notebook › Token completions show up without running the cell when in the same cell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the relevant test passing now - thank you!
@meeseeksdev please backport to 4.0.x |
Co-authored-by: Carlos Herrero <26092748+hbcarlos@users.noreply.github.com>
References
fixes #14790
Code changes
Adds rank to the ICompletionProvider and sets a rank of ~500 to the default providers.
User-facing changes
The default rank of the providers.
Backwards-incompatible changes
N/A