[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eglot, project.el, and python virtual environments

From: Danny Freeman
Subject: Re: Eglot, project.el, and python virtual environments
Date: Thu, 17 Nov 2022 08:41:37 -0500

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> > > project_root
> > > ├── .git
> > > ├── src
> > > │   └── python
> > > │       ├── VeryImportantLambda
> > > │       │   └── .venv
> > > │       ├── MoreImportance
> > > │       │   └── .venv
> > > │       ├── RunInCaseOfEmergency
> > > │       │   └── .venv

I just realized you posted information about the .venv files in your
original post and I completely overlooked that lol. 

> Thank you very much, that does help indeed! I started off down this path
> and had gotten as far as eglot-lsp-context. Then I realized I couldn't
> just return a directory, it had to be a project object, and that's when
> I decided someone else must have a better approach. But it's great to
> see all this laid out, and knowing about `(cons 'transient root)' is
> very helpful, as well.
> I'll play around with this a bit. It seems like a not-outlandish
> situation, and I wonder if it might not be useful to provide some
> standardized method of helping Eglot find an alternate project.
> Thanks again,
> Eric

Anyways yeah, I think I've heard about someone else running into this as
well. Maybe it was on the reddit emacs forum. Either way, I do not think
you are the first.

What might an extension for Eglot look like? Maybe a built in
`project-find-functions' implementation that does something similar
looking for a `.eglot-lsp-root` (or probably something configurable) as
a transient project root? I don't know if that would cause problems out
of the box for some people, but it seems safe.

Danny Freeman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]