[Top][All Lists]

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

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

From: Eric Abrahamsen
Subject: Re: Eglot, project.el, and python virtual environments
Date: Thu, 17 Nov 2022 10:09:42 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

North Year <ny-ml@outlook.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>> Hi,
>> Here’s another issue that’s technically a emacs.help question, but might
>> result in some code/documentation updates, so I’m sending it here.
>> My main day-job code base is an AWS CloudFormation monstrosity involving
>> several Python Lambdas, among other things. Basic project structure
>> looks like:
>> project_root
>> ├── .git
>> ├── src
>> │   └── python
>> │       ├── VeryImportantLambda
>> │       │   └── .venv
>> │       ├── MoreImportance
>> │       │   └── .venv
>> │       ├── RunInCaseOfEmergency
>> │       │   └── .venv
>> I’m using the python-lsp-server python package in each Python
>> subdirectory, and the key is that each of those directories is a virtual
>> environment that needs to stay isolated from the others. Each has
>> different packages installed, and in some cases even the Python versions
>> are different (though I’m trying to get rid of that).
> Maybe I have a silly solution,
> Since you are using .git, then maybe you can create a .hg, .svn,
> or what ever CVS tools other than svn,
> in VeryImportantLambda folder, MoreImportance folder, and 
> RunInCaseOfEmergency folder.
> Then when you visit files in VeryImportantLambda folder,
> then project.el will set the project root at VeryImportantLambda,
> I think everything would just be fine there.
> As long as you don’t launch eglot python lsp in the “actual” project (which 
> is .git),
> which for example is project_root/src/python/main.py
> then everything should be fine.

Ah, but I'm trying to have my cake and eat it, too: have project.el
consider the whole codebase as a single project, but have Eglot use the
language server executables from the sub-directories. Putting a dummy
CVS file in the subdirectories would fool both Eglot and project.el.

reply via email to

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