OMG, I just tried lsp-bridge and it's SO GOOD! SO FAST!
FWIW I went back to Eglot, at least for now. There were too many things I need that I couldn't get to work in lsp-bridge (although I liked the completion and the speed), in particular jumping "find def" that led me into jars. (We have a lot of internal libraries, with no public documentation sites.) The startup speed in particular was amazing though, so I might make another attempt.
I can't quite tell from the README... is lsp-bridge a replacement for eglot, or an addition to? my bad, it's a replacement π
Yep, it replaces eglot completely. It also has its own completion system so it doesn't require cofru/company/etc
Which I was wondering about at first but now I really like it
I don't have appetite for replacing eglot right now, but thanks to this thread I now know about eglot-booster, which I've just installed... π
How does it work with with other completion-at-point stuff? I am using Eglot + Cider + Cape together, does lsp-bridge auto-suggestion support this?
If, like me, you've been suffering from slow eglot for years: https://github.com/manateelazycat/lsp-bridge
I still need to test https://github.com/blahgeek/emacs-lsp-booster since I'm a lsp-mode user
Yeah that's worth checking out as well
I used emacs-lsp-booster via eglot-booster for a year, but it still locked up my Emacs for 5 seconds after some an hour of hacking
Maybe too early to tell but lsp-bridge seems to have fixed that problem altogether
interesting
Its tagline is "Blazingly fast: Offload LSP request and data analysis to an external process, preventing Emacs from getting stuck due to delays or large data triggering garbage collection"
I was put off before by its requirement of a few python dependencies,, but those are quick to install
this is the one thing iβm really jealous of vim and neovim users about. the lsp story is much smoother
(i also donβt love modern python packaging being a requisite but maybe iβll have to try)
yup, I think with lsp-bridge the experience is on par (except for the install-some-python-packages part)
give it a try β it's overall very well done
thanks for highlighting it
the somewhat rambling readme doesn't do it justice
I just noticed it doesnβt support native compilation but it supports other completion systems, nice. Although I am still put off by Python requirement as I would have to probably manage some venv.
I found that I could just use the system python, avoiding venv shenanigans
in macos
/usr/bin/pip3 install epc orjson sexpdata six setuptools paramiko rapidfuzz watchdog packaging(note that /usr/bin to override what's installed via homebrew)
and then in your emacs config
(setq lsp-bridge-python-command "/usr/bin/python3")I just discovered that lsp-bridge is in nixpkgs, which should simplify installation a lot for some users (like me!) π
@pesterhazy Nice! And have you tried it with native-comp?
No I'm on 29.4. I think it's a red herring honestly
Clearly eglot and lsp-mode have an incredibly inefficient approach, given how much faster lsp-bridge is
No amount of compilation is going to help with the wrong algorithm
the major problems is emacs json parsing sucks so much, what lsp-bridge and emacs-lsp-booster did was to ask for help of rust and external tricks
That's definitely one of the problems
But I think lsp-bridge does a lot more
C'mon people get over your fear of π
Yeah, I don't have a problem with how they fix it, it's just that I'm used to lsp-mode well tested features, custom integrations with treemacs for some features, I don't feel this big performance issue but I agree is not ideal
I empathize. I'm just thrilled to be able to type without outrageous input latency again. You can really feel the difference
I am giving lsp-bridge a spin and I'm blown away by the difference between it and Eglot in terms of responsiveness π΅
Yeah, I'll have to give it a try hehe
(I haven't managed to hook it into xref yet though π )
My key bindings if it helps https://github.com/pesterhazy/emacs.d/blob/99952d999ae441387ceedbd8348a9f059241f238/init.el#L287
It was a drop in replacement for eglot for me, I kept the same shortcuts
Actually here's the correct link https://github.com/pesterhazy/emacs.d/blob/cedcf4475c332486522ef04577cad1cb33515eb6/init.el#L288
forgot to push
Thanks, but I'm not using evil π I didn't have anything customised with eglot, except for https://github.com/stig/dotfiles/blob/trunk/emacs/init.el#L460 the default xref bindings "just worked". Guess I'll be looking through lsp-bridge's customise options to see if I can find one that enables that.
https://github.com/manateelazycat/lsp-bridge/blob/2e9b481a226e1d7e538e3910bf36d61a53c45a23/langserver/clojure-lsp.json#L6 probably needs to be improved to consider lein and other projecs
just installed on doom-emacs, noticed it doesn't work out of the box for some reason, will check configs
Emacs@30 json parser makes a difference too. There is also https://github.com/zbelial/lspce which is also fast.