Ask questions[REQUEST] Automatically activate a pipenv environment if available
It would be really nice if
doom-emacs tried to run
pipenv-activate on Python files.
pipenvis not available
lsp-modeactivates automatically for every file. If the language server is installed into a virtual environment,
lsp-modewill not find it without activated virtualenv.
A possible complication is that while
lsp-mode starts a language server per workspace,
pyvenv applies its configuration globally, so that something like a
pipenv-activate combo is needed every time a buffer is opened or switched to.
Answer questions hlissner
I'll look into restarting LSP servers when the python environment changes. I don't think this is acceptable on buffer switch, but it makes sense to do so upon a) first entering a python-mode buffer (calling
python-mode-hook would happen soon enough for LSP to see the changes) and b) when switching workspaces. I'll look into implementing these.