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

Completer improvements: kernel type mapping and dynamic documentation #487

Merged
merged 9 commits into from
Jan 24, 2021

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Jan 23, 2021

References

  • provides mechanism for mapping between some kernel types and LSP types for icons selection, fixes Provide mapping between some kernel types and LSP types? #333
    • motivated by IJulia returning very different types than LSP types and IPython returning <unknown> if it cannot match a type
  • implements completionItem/resolve to allow for:
    • display of documentation panel with R language server which does not send documentation in the first request but requires completionItem/resolve
    • faster completion (Slow completion for large Python packages when using the default pyls #272) once pyls or jedi-language-server implement completionItem/resolve too
    • store original completionItem and resolve using exactly it?
    • add test with R language server
    • open issues on pyls and jedi proposing to implement completionItem/resolve; create a PR in the repo that will accept such a contribution (help welcome!)
  • makes use of newly exposed Completer.IRenderer, for implementation of active item tracking and implements makrdown rendering of documentation in Completer.IRenderer
  • add support for deprecation via CompletionItemTag.Deprecated
    • declare tag support
    • check if any supported server implements it and if yes, test it; checked that do not support: jedi, julia, pyls, R; maybe javascript/typescript server?

Related upstream PR:

Code changes

Added LazyCompletionItem class implementing CompletionHandler.ICompletionItem but also doing much more to workaround the limited flexibility of upstream (see the self-reference trick to workaround jupyterlab/jupyterlab#9643). The new object-oriented code reduced complexity of the completion handler making it considerable more pleasant and enabled implementation of completionItem/resolve.

User-facing changes

R-docs-with-prefetch

Backwards-incompatible changes

Chores

  • linted
  • tested
  • documented
  • changelog entry

@krassowski
Copy link
Member Author

krassowski commented Jan 23, 2021

The lint failure seems to be due to the changes in the new mypy release (0.800). changelog.

  • Also, I can confirm that Windows failures reveled a further issue with completion for large namespaces. Yet to be investigated.

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.

Provide mapping between some kernel types and LSP types?
1 participant