feat: implement automatic python discovery for zero-config extension#19
feat: implement automatic python discovery for zero-config extension#19Mohamed-Sobea wants to merge 4 commits into
Conversation
|
Hi @Mohamed-Sobea Thanks for the work on this, and sorry for the late reply/review (I was down with a cold…). This looks basically good to me, although it isn't quite working for me, but that might also have to do with some semi-broken virtual environment setup on my machine. It would be great (also for testing) if this would be even more powerful though, i.e. it would automatically reload the language server when the activated python environment changes. I guess there is some kind of hook from the Python extension that we can use for that? Oh, and something rather trivial: the |
|
Hi @mstimberg, I hope you're feeling much better now. |
|
Hi Marcel @mstimberg, I’ve implemented the hook we discussed. I found the Changes:
About 'not working' issue: this is a screenshot of the logs showing the extension successfully detecting and launching from a local virtual environment (stranger_test/.venv) and the AttributeError . |


Overview
This PR implements automatic Python interpreter discovery as discussed in Issue #13. The goal was to remove the requirement for users to manually configure the
python.interpreterpathsetting.Changes
ms-python.pythonas an extension dependency inpackage.json.activate()to utilize the official Python Extension API for environment discovery.getPythonPathhelper to dynamically fetch the active environment.Testing
Demo:

Closes #13