Hacker News new | past | comments | ask | show | jobs | submit login

I gave up on LSP for a very long time because of how janky lsp-mode behaved; I've been using eglot for a few months now and it's been a revelation. In particular, eglot goes out of its way not to introduce new editor features, but rather to integrate with features that already exist, like xref.

If you've had problems getting this stuff to work, I highly recommend eglot.




Same. I just got back to Emacs, tried both, but the shoddy support for TRAMP in lsp-mode is what pushed me away from it. I also felt lsp-mode did everything but the kitchen sink, while eglot works best with my handrolled minimal configuration.


I also recently switch away from lsp-mode to eglot and I could not be happier. The setup was simpler than with lsp-mode and eglot doesn't make new things happen in my editor without me opting into them (e.g., lsp gives you a breadcrumb bar at the top of the window).

In general, I'm really enjoying the rise of high-quality packages that work with Emacs rather than providing their own thing. For instance I switched from Ivy to Vertico and it's nice that there's nothing to configure: any time Emacs prompts for input, Vertico is there. With Ivy, I had to do a few configurations to enable Ivy completion everywhere.


I use `lsp-mode` but it's true I had to remove a lot of the bells and whistles because the constant overlays and popups were distracting.


Wow, thanks for the recommendation! I share the frustration with lsp-mode's jankiness (although it has been working better in the last months) and also gave up on the whole thing a few times, even though LSP itself is great. I had no idea that there was a viable alternative to lsp-mode. Even eglot's setup instructions look less complex than lsp-mode's.


I second this. lsp-mode was the main recommendation when I started looking into LSP for Emacs, and it was ok, but I switched to eglot a few months ago and I’m very happy with it. It’s more Emcas-y, IMO.


Just to be super clear about this: "more emacs-y" is not personally a preference of mine, and I'm actually more attracted to things that consciously break the mold of conventional Emacs (I love Helm, I love Magit, I love things that pop new UI up into my face). And most of the stuff that eglot integrates into, I didn't really ever play with or even know before I turned eglot on.

What makes eglot work for me is that it actually works. It is very low drama and does essentially what it says it'll do. I open up a file in most of the languages I work on, click on a function call, `xref-find-definitions`, and poof there I am at that function's definition. It's cut down my grepping by at least 50%.


Good to know. I've struggled with setting up lsp for Elixir (after Alchemist was retired). I've settled for IntelliJ with Emacs keybindings (which really isn't a bad way to go, all things considered).


How do you manage with out kill ring? I tried it and I just can't get through 10min of usage without


Have you tried the command: "Paste from history..." I have it bound to Opt+Y in IntelliJ


To be honest, I don't use kill ring anyway, but would probably be a good thing for me to learn about in my regular emacs work.


I've found a couple times now that the reason lsp-mode doesn't work and keeps asking to restart the server is because I had another binary in my path with the same name as the server it's trying to call. For example just today this was happening with pyright, and it worked perfectly again after running "pip uninstall pyright" in a terminal (or maybe it was called lsp-pyright). I believe the lsp-mode keeps its server binaries in a separate folder.


I haven’t used eglot but just noticed that it was created by João Távora, who also created yasnippet, which is a delight to use. Definitely going to try it out.


I mention eglot in the article: the reason I'm not using it is it's not packaged in Debian (yet?). Apparently, it should land in Emacs core eventually (as mentioned in the article too) so I'm basically waiting for that. In the meantime, lsp-mode is fine for the light programming I do on a daily basis.


Any reason not to package-install it? Especially when using the use-package sweet, sweet syntactic sugar? As a Debian user I don't see too much point in using system -wide packages with emacs.


i don't think the security model of package-install is good enough for my thread model. (to be fair, i still package-install some stuff, and, yes, with use-package, but i'm trying to eradicate that practice.)


Does eglot work with projectile yet?


Nope, just project.el.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: