You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Internally, poetryl.el uses pyvenv to manage the current virtual environment (see here). I solved this by adding the following to my Emacs configuration:
; Run lsp-restart-workspace whenever the pyvenv changes
(add-hook'pyvenv-post-activate-hooks (lambda () (lsp-restart-workspace)))
(add-hook'pyvenv-post-deactivate-hooks (lambda () (lsp-restart-workspace)))
On the upside, if you use pyvenv for projects that don't use Poetry, then this should also work there as well.
Hi, thanks for maintaining this package!
I'm an
lsp-mode
user and the snippet provided by @jidicula works great to determine the correct virtual env.But when a dependency is added or removed you have to manually execute
lsp-workspace-restart
so the library changes are available to the project.Is it possible to execute this command after every
poetry-add
orpoetry-remove
if LSP-mode is used?Thanks!
The text was updated successfully, but these errors were encountered: