lsp

pesterhazy 2025-01-29T20:42:09.457039Z

OMG, I just tried lsp-bridge and it's SO GOOD! SO FAST!

Stig Brautaset 2025-02-11T10:33:24.658169Z

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.

πŸ‘ 1
Stig Brautaset 2025-01-30T11:03:36.328159Z

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 πŸ™‚

pesterhazy 2025-01-30T11:57:32.733389Z

Yep, it replaces eglot completely. It also has its own completion system so it doesn't require cofru/company/etc

pesterhazy 2025-01-30T11:57:52.010869Z

Which I was wondering about at first but now I really like it

Stig Brautaset 2025-01-30T12:20:07.748099Z

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... πŸ˜„

Akiz 2025-01-31T07:58:04.783109Z

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?

pesterhazy 2025-01-29T20:42:37.647309Z

If, like me, you've been suffering from slow eglot for years: https://github.com/manateelazycat/lsp-bridge

ericdallo 2025-01-29T20:43:21.240739Z

I still need to test https://github.com/blahgeek/emacs-lsp-booster since I'm a lsp-mode user

pesterhazy 2025-01-29T20:45:19.713589Z

Yeah that's worth checking out as well

pesterhazy 2025-01-29T20:45:58.146189Z

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

pesterhazy 2025-01-29T20:46:39.250129Z

Maybe too early to tell but lsp-bridge seems to have fixed that problem altogether

ericdallo 2025-01-29T20:47:04.027649Z

interesting

pesterhazy 2025-01-29T20:47:25.263349Z

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"

pesterhazy 2025-01-29T20:48:06.952199Z

I was put off before by its requirement of a few python dependencies,, but those are quick to install

dpsutton 2025-01-29T20:48:12.116399Z

this is the one thing i’m really jealous of vim and neovim users about. the lsp story is much smoother

dpsutton 2025-01-29T20:48:32.639319Z

(i also don’t love modern python packaging being a requisite but maybe i’ll have to try)

πŸ‘ 1
pesterhazy 2025-01-29T20:48:43.145309Z

yup, I think with lsp-bridge the experience is on par (except for the install-some-python-packages part)

πŸŽ‰ 1
pesterhazy 2025-01-29T20:48:55.495929Z

give it a try – it's overall very well done

dpsutton 2025-01-29T20:49:06.692439Z

thanks for highlighting it

pesterhazy 2025-01-29T20:49:08.758279Z

the somewhat rambling readme doesn't do it justice

Akiz 2025-01-31T15:35:35.232019Z

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.

pesterhazy 2025-01-31T15:39:32.559709Z

I found that I could just use the system python, avoiding venv shenanigans

pesterhazy 2025-01-31T15:40:39.213329Z

in macos

/usr/bin/pip3 install epc orjson sexpdata six setuptools paramiko rapidfuzz watchdog packaging

pesterhazy 2025-01-31T15:40:51.055069Z

(note that /usr/bin to override what's installed via homebrew)

pesterhazy 2025-01-31T15:41:04.199729Z

and then in your emacs config

(setq lsp-bridge-python-command "/usr/bin/python3")

Stig Brautaset 2025-01-31T16:40:55.167969Z

I just discovered that lsp-bridge is in nixpkgs, which should simplify installation a lot for some users (like me!) πŸ™‚

2️⃣ 1
Akiz 2025-01-31T17:20:30.118839Z

@pesterhazy Nice! And have you tried it with native-comp?

pesterhazy 2025-01-31T18:01:34.634539Z

No I'm on 29.4. I think it's a red herring honestly

pesterhazy 2025-01-31T18:02:30.425009Z

Clearly eglot and lsp-mode have an incredibly inefficient approach, given how much faster lsp-bridge is

pesterhazy 2025-01-31T18:03:07.654459Z

No amount of compilation is going to help with the wrong algorithm

ericdallo 2025-01-31T18:03:34.592149Z

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

pesterhazy 2025-01-31T18:04:00.344099Z

That's definitely one of the problems

pesterhazy 2025-01-31T18:04:21.868099Z

But I think lsp-bridge does a lot more

pesterhazy 2025-01-31T18:05:04.097789Z

C'mon people get over your fear of 🐍

πŸ˜‚ 1
ericdallo 2025-01-31T18:07:24.284319Z

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

πŸ‘ 1
pesterhazy 2025-01-31T18:10:00.076709Z

I empathize. I'm just thrilled to be able to type without outrageous input latency again. You can really feel the difference

πŸ‘ 1
Stig Brautaset 2025-01-31T18:23:58.085379Z

I am giving lsp-bridge a spin and I'm blown away by the difference between it and Eglot in terms of responsiveness 😡

ericdallo 2025-01-31T18:24:27.284479Z

Yeah, I'll have to give it a try hehe

Stig Brautaset 2025-01-31T18:24:55.646099Z

(I haven't managed to hook it into xref yet though πŸ˜„ )

pesterhazy 2025-01-31T18:39:44.908329Z

My key bindings if it helps https://github.com/pesterhazy/emacs.d/blob/99952d999ae441387ceedbd8348a9f059241f238/init.el#L287

1
pesterhazy 2025-01-31T18:40:27.870809Z

It was a drop in replacement for eglot for me, I kept the same shortcuts

πŸ‘ 1
pesterhazy 2025-01-31T18:42:29.507559Z

Actually here's the correct link https://github.com/pesterhazy/emacs.d/blob/cedcf4475c332486522ef04577cad1cb33515eb6/init.el#L288

1
pesterhazy 2025-01-31T18:42:31.760559Z

forgot to push

Stig Brautaset 2025-01-31T18:43:15.006349Z

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.

ericdallo 2025-01-31T18:56:09.578839Z

https://github.com/manateelazycat/lsp-bridge/blob/2e9b481a226e1d7e538e3910bf36d61a53c45a23/langserver/clojure-lsp.json#L6 probably needs to be improved to consider lein and other projecs

ericdallo 2025-01-31T19:19:38.693049Z

just installed on doom-emacs, noticed it doesn't work out of the box for some reason, will check configs

Akiz 2025-01-31T20:53:44.562999Z

Emacs@30 json parser makes a difference too. There is also https://github.com/zbelial/lspce which is also fast.

🧑 1