Re:Why Emacs: Redux
by rwilson4 on Wednesday November 17, 2021 @09:27AM
(#29253394)
Have you considered a .dir-locals.el file?
[ Parent
| on HN ]
Re:Why Emacs: Redux
by ReleaseCandidat on Wednesday November 17, 2021 @09:56AM
(#29253822)
That's actually how I ended up doing it. But not dynamically running `pipenv --venv` but hard-coding the path to the virtualenv, which I don't like :(
Re:Why Emacs: Redux
by bananaoomarang on Wednesday November 17, 2021 @10:28AM
(#29254339)
In case it helps:
I have struggled with a similar thing (poetry not pipenv, but should be applicable) and came to this working solution: https://github.com/bananaoomarang/dotfiles/blob/master/emacs...
Basically: if poetry project file exists in project root, get the path for the active venv with poetry and activate with the emacs pyvenv package. This adds a little jank when switching projects I haven't looked into ironing out yet but it is functional.