-
Notifications
You must be signed in to change notification settings - Fork 148
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
Sorted completions, improve completions marking and filtering and doc panel #520
Conversation
Awesome stuff. The sorting of search results is hilariously hard, getting mired in the whole field-based boosting, etc. but this is a very good step. |
It's probably worth a look through |
Yes, the code related to sorting is taken from core and changes are meant to be up-streamed for 4.0. I also modified the pyls sorting on my fork, please feel welcome to chime in and comment it: https://github.com/krassowski/python-language-server/pull/1/files#diff-66c341f45ce292941d6a15c7e287ce5faf7f7e7d10f35bb5919722995bd982c9R9-R36 As pyls is in a weird state where the spyder folks who were maintaining it (even though it was maintaining in a literal sense of literal life support and not much development) no longer have merge rights (which might take months to rectify) we should think about some solution. One solution would be a community fork, but lets see how things play out. While my fork is not yet ready for general use (no CI and infrastructure set up) and I do not like the legacy baggage from pyls (like Python 2), it might be possible to refactor it to something usable and keep it compatible with community extensions. An alternative would be to default to jedi-langauge-server as it is being still maintained and developed; it is nice because of the pygls but not nice because of a strictly limited scope. If it had the plugins/entry points mechanism as pyls it would be so great! (See pappasam/jedi-language-server#32). A third alternative is using pyright. It is node-based (and MS) and controversial due to how pylance is being licensed. Just mentioning this here, but it will probably deserve its own issue soon. |
Yeah, it's hard to have nice things, great work you're doing. This is probably another JEP, not just a discussion on our repo. I feel like a number of things could happen:
I don't really see myself wanting to rely on any of the first-party MS stuff (especially if it's future-abandonware, and my feelings on requiring |
as the R installation on Ubuntu pulls more into the global namespace of R making it show up much lower on the list
sortText
if provided (jets tested and indirectly integration-tested)filterText
if provided (jest tested)Code changes
LSPCompleterModel
) and create a generic templateGenericCompleterModel
which will make the live much easier once upstreamed for 4.0 (Completer widget public API refactor jupyterlab/jupyterlab#9763); at this point it is experimental API to be upstreamed so if anyone depending on our codebase looks at it - please do not rely on this API just yet.matchSumOfSquares
to allow for matching onfilterText
which does not have to be a substring oflabel
; there is a price to pay for the second match calculation on numpy completions, but the total cost is over an order of magnitude lower of the current limiting factor of SVG rendering and item rendering in general.User-facing changes
TBD. So many nice things :)
Backwards-incompatible changes
LazyCompletionItem
to a file of its own (item.ts
); better to make this change earlyLSPCompleterModel
Chores