auto-virtualenv icon indicating copy to clipboard operation
auto-virtualenv copied to clipboard

Chicken-or-the-egg problem with LSP

Open alamaison opened this issue 1 year ago • 3 comments

My Python LSP server is installed in the virtualenv that auto-virtualenv is activating.

When opening a Python file LSP tries to start a server for it before auto-virtualenv activates for that buffer and fails. When auto-virtualenv finishes activating, it tries to reload the LSP server with lsp-restart-workspace but that doesn't do a reload because "lsp-restart-workspace: There are no active servers in the current buffer".

Is there a way to get these ordered properly?

alamaison avatar Feb 08 '25 21:02 alamaison

Hi @alamaison,

Could you check the Messages buffer to see what it says? Do you have auto-virtualenv-verbose set to t?

marcwebbie avatar Jun 08 '25 15:06 marcwebbie

lsp-restart-workspace has been changed to lsp-workspace-restart

chrisemke avatar Jul 28 '25 20:07 chrisemke

Hi @chrisemke i am not sure i understand what you meant?

marcwebbie avatar Sep 03 '25 11:09 marcwebbie