4 ms·
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 particula
by tptacek 5y ago
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.
- mostafah 5y agoI 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.
- tptacek 5y agoJust 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%.
- lliamander 5y agoGood 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).
- guywhocodes 5y agoHow do you manage with out kill ring? I tried it and I just can't get through 10min of usage without
- adl 5y agoHave you tried the command: "Paste from history..." I have it bound to Opt+Y in IntelliJ
- lliamander 5y agoTo 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.
- emacs28 5y agoI'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.
- sph 5y agoSame. 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.
- loevborg 5y agoWow, 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.
- gnuvince 5y agoI 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.
- NeutralForest 5y agoI 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.
- mumblemumble 5y agoDoes eglot work with projectile yet?
- tptacek 5y agoNope, just project.el.
- anarcat 5y agoI 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.
- gpderetta 5y agoAny 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.
- anarcat 5y agoi 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.)
- mgalgs 5y agoI 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.