python-language-server icon indicating copy to clipboard operation
python-language-server copied to clipboard

Implement completionItem/resolve

Open krassowski opened this issue 3 years ago • 1 comments

This is a proposal to implement completionItem/resolve in order to improve the speed of completions; the need to resolve documentation dynamically was confirmed by profiling in #826.

The idea is that the textDocument/completion sends only the properties which are cheap to compute (say label, sortText, insertText, etc), while documentation, detail (and any other property since LSP 3.16.0) would be only sent once the clients requests to resolve the details with the completionItem/resolve request. This improves the initial speed and gives the user all information - no compromise.

The lag for completionItem/resolve can be lower than the perception threshold (dozens of milliseconds), and the client can pre-fetch a few completionItem/resolve as soon as it gets the completion result (I implemented this in my client here).

Would any of the maintainers be interested in accepting a PR that would do that? Any design suggestions?

I am opening this issue before starting any work as I see multiple PR hanging without response. Do I understand that this repository is now maintained by volunteers and not by the palantir anymore?

krassowski avatar Jan 24 '21 14:01 krassowski

Would any of the maintainers be interested in accepting a PR that would do that?

If it helps to improve the speed of completions, we're very interested on it.

Any design suggestions?

Not from my side. @andfoy, do you have suggestions for @krassowski?

Do I understand that this repository is now maintained by volunteers and not by the palantir anymore?

It's been maintained by the Spyder team since a year and a half ago. However, sometimes we've got busy with other things and don't have time to merge work here.

ccordoba12 avatar Jan 24 '21 17:01 ccordoba12