Since I work on large Python projects, use direnv
to manage my environment, and lsp-mode
, I thought I might be able to help, but reading your long message I can’t find any specific issue except it sounds like your LSP server is misbehaving.
I do not get lagging or memory leaking in Emacs from using it. What process is getting large? Emacs or the LSP server? You don’t give us any clues.
You’ll need to explain that to those of us who use Emacs for professional work. What fails for you? In particular, what fails that needs threading to be resolved?