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

[plugin] Implement registerDeclarationProvider #6173

Merged
merged 2 commits into from
Sep 13, 2019

Conversation

AlexTugarev
Copy link
Contributor

@AlexTugarev AlexTugarev commented Sep 12, 2019

What it does

Implements missing DeclarationProvider API to allow recent versions of Python LS to work nicely.

Fixes #5213

How to test

  • install vscode extension for python
  • add "python.jediEnabled": false to your preferences
  • open any python file and watch the LS being loaded and initialized
  • inspect language features at least with import os (check content assist and go to declaration of os)

Screen Shot 2019-09-12 at 13 31 21

output channel should contain something like:

Starting Microsoft Python language server.
[Info  - 11:34:23 AM] Analysis cache path: /home/gitpod/.cache/Microsoft/Python Language Server
[Info  - 11:34:23 AM] GetCurrentSearchPaths /home/gitpod/.pyenv/versions/3.7.4/bin/python3 
[Info  - 11:34:23 AM] Interpreter search paths:
[Info  - 11:34:23 AM]     /home/gitpod/.pyenv/versions/3.7.4/lib/python3.7
[Info  - 11:34:23 AM]     /home/gitpod/.pyenv/versions/3.7.4/lib/python3.7/lib-dynload
[Info  - 11:34:23 AM]     /home/gitpod/.pyenv/versions/3.7.4/lib/python3.7/site-packages
[Info  - 11:34:23 AM] User search paths:
[Info  - 11:34:27 AM] Microsoft Python Language Server version 0.3.66.0
[Info  - 11:34:27 AM] Initializing for /home/gitpod/.pyenv/versions/3.7.4/bin/python3
> conda info --json

Review checklist

Reminder for reviewers

Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. I don't see the error message anymore.

@AlexTugarev
Copy link
Contributor Author

@akosyakov should this be added to change logs?

@svenefftinge
Copy link
Contributor

I wonder how declaration is different than definition... couldn't find any good information on the LSP spec.

@akosyakov akosyakov added languages issue related to languages plug-in system issues related to the plug-in system labels Sep 13, 2019
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code changes looks good to me

@akosyakov
Copy link
Member

akosyakov commented Sep 13, 2019

@AlexTugarev AlexTugarev merged commit dbb25e0 into master Sep 13, 2019
@vince-fugnitto vince-fugnitto deleted the at/registerDeclarationProvider branch September 29, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
languages issue related to languages plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement "DeclarationProvider" API
3 participants