Skip to content

ryotaro612/pyvenv-auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyvenv-auto

Abstract

pyvenv-auto automatically activates a Python venv with pyvenv. When you open a file in python-mode, it searches for the venv directory near the file, and activates it.

Installation

You can install the package from Melpa:

M-x package-install RET pyvenv-auto

Usage

You can enable pyvenv-auto as below.

(use-package pyvenv-auto
  :hook ((python-mode . pyvenv-auto-run)))

When you open a Python file, pyvenv-auto searches for a venv directory with a name in pyvenv-auto-venv-dirnames. The default value of the variable is (list "venv" ".venv"). The search behavior is similar to that of locate-dominating-file. The directory name with a smaller index has higher priority than that with a greater index.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published