Skip to main content

🏁 Getting Started

venv-selector.nvim is a neovim plugin to let you switch back and forth between python virtual environments without leaving neovim.

Search Screenshot

LazyVim - Using telescope as picker.

✨ Features

🔄 Virtual Environment Management

  • 🚀 Hot-swapping: Switch between virtual environments without restarting Neovim
  • 🎯 Smart activation: Automatically activate environments based on your project
  • 💾 Memory: Remember and cache environments for instant activation

🔍 Environment Discovery

  • 🧠 Custom searches: Define your own search patterns with regular expressions
  • 🗂️ Built-in support for popular Python environment managers:

🚀 UV Integration

  • ⚡ PEP-723 support: Automatic environment creation using metadata in file headers
  • 📜 Script dependencies: Define requirements directly in your Python files
  • 🔄 Auto-sync: Environments update when you modify script metadata

🛠️ Development Tools

  • 🔬 Testing searches: Test custom searches directly in the picker
    • :VenvSelect fd 'python$' ~/Code --full-path -IH -a
  • 🪝 Custom callbacks: Filter and modify results as they're discovered
  • 📊 Multiple pickers supported:

🔗 LSP Integration

⚙️ Automation & Hooks

  • 🎣 Custom hooks: Execute callback functions when environments are activated
  • 💾 Intelligent caching: Automatically remember and reactivate project environments

Requirements

  • Requires fd to be installed for built-in searches to work.
  • One of the above file pickers should be installed, or the very basic native one is used.
  • Requires a terminal nerd font to be configured for the icons to look correct.

Optional Requirements