Skip to content

Instantly share code, notes, and snippets.

@thorrr
Created March 5, 2024 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thorrr/a58fdc02680c8f715696686325d45506 to your computer and use it in GitHub Desktop.
Save thorrr/a58fdc02680c8f715696686325d45506 to your computer and use it in GitHub Desktop.
.dir-locals.el: auto activate virtualenv called "venv" in python project directory
((nil . (
(eval . (setq pyvenv-activate (concat (locate-dominating-file default-directory ".dir-locals.el") "/venv/")))
(eval . (setq lsp-pylsp-server-command
(concat (locate-dominating-file default-directory ".dir-locals.el") "/venv/bin/pylsp")))
)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment