Add support for environment detection to VSCode
This is probably not relevant for us yet, but I want to track contributing this.
e.g.
- https://github.com/microsoft/vscode-python/pull/15765
- https://github.com/microsoft/vscode-python/pull/22779
Actually it would be really appreciated feature, I have been already struggling with this
I am noticing that uv's .venv folder is not detected by vscode.
Oddly, the .venv folder produced by poetry and pdm do get detected and the venv is auto-activated within the integrated terminal of vscode.
Edit: Seems this was a fluke. It's being found by vscode now!
Huh, interesting. There's nothing special about our .venv!
I just try it with VSCodium but it does auto-activated the venv.
Would be very useful. is there any workaround for this?
I also had issues on linux with that, on my side the problem was that I installed vscode/vscodium from a flatpak.
Installing from a regular package manager solved the issues. I just select the python interpreter from vscode and it detects all the installed packages in the .venv folder.
However I am unable to create from vscode a .venv environemnt using uv.
What might be nice is smart handling of script dependency metadata.
We added environment detection to python-environment-tools which is the backing source for VS Code.
I think there's more to be done for PEP 723 scripts, but I consider that separate from the intent of this issue.
cc @zsol