Skip to content

Support dynamic changes of search paths in language server #2395

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

Closed
albireox opened this issue Aug 15, 2018 · 7 comments
Closed

Support dynamic changes of search paths in language server #2395

albireox opened this issue Aug 15, 2018 · 7 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality

Comments

@albireox
Copy link

Environment data

  • VS Code version: 1.27.0-insiders
  • Extension version (available under the Extensions sidebar): 2018.8.0-alpha
  • OS and version: 10.14
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

I have a list of Python packages that are not installed in site-packages under python.autoComplete.extraPaths. Jedi uses those paths to provide completions. The new LS does not seem to recognise them. I also get IntelliSense linter warnings when importing those packages, which doesn't happen with Jedi.

Expected behavior

The LS should treat the packages under python.autoComplete.extraPaths as if they were normally installed libraries.

@MikhailArkhipov
Copy link

Can you provide more details on repro and what is expected? Thanks

@MikhailArkhipov MikhailArkhipov self-assigned this Aug 15, 2018
@albireox
Copy link
Author

albireox commented Aug 15, 2018

Sorry, I think I talked too fast. The path for one of the packages I keep in my python.autoComplete.extraPaths had changed and although I fixed it, it seems VSCode needed to be restarted for the change to register. The LS seems to be correctly autocompleting the packages in python.autoComplete.extraPaths.

I think this can be closed, although it would be nice if changes to python.autoComplete.extraPaths don't require a restart to take effect.

@MikhailArkhipov
Copy link

MikhailArkhipov commented Aug 15, 2018

Ah, that is true. LS needs to be restarted when search paths change (Reload Window command is sufficient). I will rename the issue instead.

@MikhailArkhipov MikhailArkhipov added feature-request Request for new features or functionality area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. upstream-language server labels Aug 15, 2018
@MikhailArkhipov MikhailArkhipov changed the title New LS does not respect python.autoComplete.extraPaths Support dynamic changes of search paths in language server Aug 15, 2018
@MikhailArkhipov MikhailArkhipov removed their assignment Aug 15, 2018
@agerhbour
Copy link

This is actually the behaviour I am currently seeing.
Use Jedi - packages in python.autoComplete.extraPaths have completions provided
Use LS without changing any other settings - packages referenced in extraPaths do not have completions provided.

@Honzys
Copy link

Honzys commented Dec 8, 2018

Hello,

Is it possible to make this dynamic behaviour not only for searching for paths in the settings, but also for checking for any changes in tha packages specified by python.autoComplete.extraPaths? So if I do some changes in the package, the intellisense/autocomplete would mirror these updates dynamically and suggest for example for newly added modules and basically correspond to the newest version?

This behaviour is normal in the namespace of the project (it checks any changes in the current package and updates dynamically), is it possible to extend this functionality to the packages defined in the python.autoComplete.extraPaths?

Or just have some command to "refresh" the informations for selected packages, since the reloading whole vscode takes too long?

I hope I made myself clear, feel free to ask any additional questions if you didn't understand me what I've meant exactly.

Thank you very much

@MikhailArkhipov
Copy link

Should be addressed by microsoft/python-language-server#1492

@DonJayamanne
Copy link

Closing as this has been resolved upstream.

@ghost ghost removed the needs PR label Sep 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants