📜 UV Support
- 🔄 Automatic Buffer Switching: Different Python files with PEP 723 metadata get their own UV environments automatically
- 📊 Statusline Integration: Visual feedback shows which UV environment is active
- 💾 Auto-sync on Save: Dependencies and Python versions stay updated when you modify the script metadata
- ⚡ Instant Environment Creation: UV creates and manages environments transparently in the background
Uv support works differently and doesnt use any picker. If you add pep 723 metadata to the top of a python file, :VenvSelect
will attempt to use uv to install the correct python version and dependencies and activate the venv. For example:
- 📄 Script Example
- 🐛 Debug Output
# /// script
# requires-python = "<= 3.10.0"
# dependencies = [
# "httpx <= 0.10.2",
# "pip"
# ]
# ///
This would install a older version of both python
and httpx
and activate the venv using uv. You can open a terminal and type pip freeze
to see the version of httpx
got installed.
You dont use the picker to work with uv environments using pep 723 metadata. Its designed to be automatic in the background. If you have errors in your metadata, you will get notified:
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: Installed 11 packages in 4ms
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + certifi==2025.8.3
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + chardet==3.0.4
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + h11==0.9.0
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + h2==3.2.0
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + hpack==3.0.0
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + hstspreload==2025.1.1
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + httpx==0.10.1
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + hyperframe==5.2.0
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + idna==2.10
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + rfc3986==1.5.0
2025-09-01 10:27:30 [DEBUG]: uv sync --script /mnt/extra/Code/Personal/venv-test/uvtest5.py stderr: + sniffio==1.3.1