[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eglot, project.el, and python virtual environments
From: |
Augusto Stoffel |
Subject: |
Re: Eglot, project.el, and python virtual environments |
Date: |
Mon, 21 Nov 2022 15:54:43 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Sun, 20 Nov 2022 at 23:54, Eric Abrahamsen wrote:
> The only remaining question is finding the right LSP executable. In my
> Python venv case, that's done by using one of the aforementioned
> packages -- there's no guarantee that the virtual environment will be
> under "./.venv", it could be somewhere else entirely. The packages
> generally work by hacking exec-path, so that Eglot's `executable-find'
> call finds the right Python LSP executable.
>
> A little care needs to be taken that the environment is "activated"
> before the call to `eglot', but it's not that tricky.
Using my buffer-env package, I never have to worry about activating a
venv. It happens automatically.
> I don't think anything more should be done to help with this
> particular Python case (besides some documentation).
>
> But maybe something could be done for finding LSP executables in the
> more general case.
I disagree that there should be some special scheme to find a LSP
executable. Note for instance that python.el has some ad-hoc stuff to
choose the right interpreter for the REPL, and here we are discussing
the same kind of issue again.
What's really needed instead is a scheme to set up the environment of a
project. There are quite a few package besides buffer-env for that, but
AFAIK nothing built-in.
> I can imagine that for saner languages, simply customizing a different
> executable path (perhaps passing it different command-line arguments)
> would be sufficient.
Python is sane in this regard, right?
- Re: Eglot, project.el, and python virtual environments, (continued)
- Re: Eglot, project.el, and python virtual environments, João Távora, 2022/11/20
- Re: Eglot, project.el, and python virtual environments, Dmitry Gutov, 2022/11/20
- Re: Eglot, project.el, and python virtual environments, João Távora, 2022/11/21
- Re: Eglot, project.el, and python virtual environments, Augusto Stoffel, 2022/11/21
- Re: Eglot, project.el, and python virtual environments, João Távora, 2022/11/20
- Re: Eglot, project.el, and python virtual environments, Eric Abrahamsen, 2022/11/21
- Re: Eglot, project.el, and python virtual environments, João Távora, 2022/11/21
- Re: Eglot, project.el, and python virtual environments, Alfred M. Szmidt, 2022/11/21
- Re: Eglot, project.el, and python virtual environments, Eli Zaretskii, 2022/11/21
- Re: Eglot, project.el, and python virtual environments, Eric Abrahamsen, 2022/11/21
- Re: Eglot, project.el, and python virtual environments,
Augusto Stoffel <=
- Re: Eglot, project.el, and python virtual environments, João Távora, 2022/11/19
- Re: Eglot, project.el, and python virtual environments, Dmitry Gutov, 2022/11/19
Re: Eglot, project.el, and python virtual environments, Philip Kaludercic, 2022/11/16
Re: Eglot, project.el, and python virtual environments, North Year, 2022/11/17
Re: Eglot, project.el, and python virtual environments, Stephen Leake, 2022/11/19