manateelazycat / lsp-bridge

A blazingly fast LSP client for Emacs
GNU General Public License v3.0
1.35k stars 197 forks source link

Document how to use lsp-bridge with python installed via pyenv #963

Closed tjtrabue closed 3 weeks ago

tjtrabue commented 3 weeks ago

Hello @manateelazycat,

Just wanted to say thank you so much for your continued dedication to making the best LSP client for Emacs! I've been using lsp-bridge for over a year now, and I absolutely love it.

The Problem

I just wanted to fill you in on an issue I ran into recently using lsp-bridge with Python versions installed via pyenv. These installations used to work with lsp-bridge right out of the box, but two days ago I started seeing these messages flooding my *lsp-bridge* buffer:

Process *lsp-bridge* exited abnormally with code 1
"/home/thegeneral/.pyenv/shims/python3": not in executable format: file format not recognized
No executable file specified.
Use the "file" or "exec-file" command.
No stack.

The Solution

Apparently the pyenv shim for python3 isn't seen as a valid Python executable, so I had to set my Python command for lsp-bridge to the path to the Python executable pointed to by the shim:

(setq lsp-bridge-python-command "~/.pyenv/versions/3.12.4/bin/python3")

Hope this helps! Thanks again for everything!

-tjtrabue

manateelazycat commented 3 weeks ago

Can you send a PR to document this in README? I will merge it, thanks for your kind words. ;)