Subject: bug#72779: EGLOT pyright bug

From: Johann De Waal <[email-masked]>
Date: Sat, 24 Aug 2024 12:12:57 +0200

Hello, thank you for your swift responses.

Following the 'emacs -Q' advice I was able to pinpoint the problem.

I had the following in my configs.
  (add-to-list 'eglot-server-programs
           '(python-mode . ("pyright"))
which had to be
  (add-to-list 'eglot-server-programs
           '(python-mode . ("pyright-langserver" "--stdio")))

I had set it in this erroneous manner because I was experimenting with mypy.

Thank you for your help.

Kind regards.

On Sat, 24 Aug 2024 at 10:59, João Távora <[email-masked]> wrote:
>
> On Sat, Aug 24, 2024 at 7:29 AM Eli Zaretskii <[email-masked]> wrote:
>
> > > Please let me know if I can improve my bug report in any way.
>
> You can follow https://joaotavora.github.io/eglot/#Troubleshooting-Eglot
> pay attention to the part about the emacs -q session.  In that
> same shell where "pyright works as expected", you should be able
> to start emacs -Q, navigate to a python file, and
> C-u M-x eglot RET pyright RET.
>
> pyright is a javascript program. It's possible you have a javascript
> environment in your shell which is not your Emacs's session.
>
> Also knowing that pyright in the command line works "as expected"
> would manually issuing LSP commands to it from stdin.  I suspect
> you haven't done that.
>
> João