feat: multiple venv support, --active flag, auto pyproject sync, and terminal options#25
Open
ABCtoDev wants to merge 1 commit intobenomahony:mainfrom
Open
feat: multiple venv support, --active flag, auto pyproject sync, and terminal options#25ABCtoDev wants to merge 1 commit intobenomahony:mainfrom
ABCtoDev wants to merge 1 commit intobenomahony:mainfrom
Conversation
…terminal options ## Multiple venv pattern support - Added find_venvs() helper that detects: .venv, .venv-*, venv, venv-* - Updated Snacks and Telescope pickers to show activation status ## venv-selector.nvim integration - Activating venv through uv.nvim updates venv-selector state - Provides unified venv management across different picker UIs ## --active flag support for custom venv When a non-default venv is activated, uv commands automatically include --active: - uv add → uv add --active - uv remove → uv remove --active - uv sync → uv sync --active - uv run → uv run --active ## Auto pyproject.toml and .python-version sync When switching venv: - Updates requires-python with strict range (e.g., >=3.11,<3.12) - Runs uv lock with target Python version - Syncs packages and updates dependency versions ## Auto LSP restart After uv add/remove/sync commands complete, LSP automatically restarts ## New execution options - hide_result_buffer: Hide result buffer from tabline (default: false) - reuse_result_split_buffer: Reuse existing result split window (default: false) - terminal: Where to open terminal - split/vsplit/tab (default: split) ## Breaking Changes - venv-selector.nvim is now a required dependency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for multiple virtual environment directory patterns with comprehensive venv management features.
Problem
Currently, uv.nvim only detects
.venvdirectories. Many projects use different naming conventions like.venv-3.11,venv, orvenv-dev.Solution
Multiple venv pattern support
Added
find_venvs()helper function that detects:.venv(exact match).venv-*(prefix match, e.g.,.venv-3.11,.venv-dev)venv(exact match)venv-*(prefix match, e.g.,venv-py311)Improved picker display
Updated both Snacks and Telescope pickers to show activation status:
● .venv (Active)- Currently active venv○ .venv-3.11- Available but inactivevenv-selector.nvim integration
Activating a venv through uv.nvim will also update venv-selector's state. This provides unified venv management across different picker UIs.
--active flag support for custom venv
When a non-default venv (e.g.,
.venv-3.11) is activated, uv commands automatically include the--activeflag:uv add→uv add --activeuv remove→uv remove --activeuv sync→uv sync --activeuv run→uv run --activeAuto pyproject.toml and .python-version sync
When switching to a different venv:
requires-pythonwith strict range (e.g.,>=3.11,<3.12).python-versionfile to matchuv lockwith target Python version to resolve compatible packagesAuto LSP restart
After
uv add/uv remove/uv synccommands complete, LSP is automatically restarted to recognize new packages immediately.New execution options
Required Dependencies
Testing
Breaking Changes
venv-selector.nvimis now a required dependency