7 ms·
Interesting, I've been using "the other one": lsp-mode, and have been quite happy with the results. Will see how eglot has progressed and if I can slim my confi
by chungus 4y ago
Interesting, I've been using "the other one": lsp-mode, and have been quite happy with the results. Will see how eglot has progressed and if I can slim my config a bit.
- TacticalCoder 4y agoSame here. Anyone know if eglot is "better" than lsp-mode? Or was it just picked because of some licensing reason? I was under the impression, but I may be wrong, that lsp-mode was somehow better than eglot. Also I wonder: if eglot is now part of Emacs, is there any incentive for the lsp-mode devs to keep working on lsp-mode?
- pdimitar 4y agoI forgot the details but several months ago I had a lot of trouble just having Rust and Elixir LSPs to even start. I got quite weary of hacking on my Emacs so I switched to eglot and had zero trouble since. Sorry for lack of context, I am not shilling for eglot at all, it's just that I have a huge "make it your own by hacking!" fatigue these days.
- timlod 4y agoI've used both, or rather, tried using both - lsp-mode never quite worked for me, whereas eglot is rather simple in comparison and easy to set up. lsp-mode does 'more' (and there's also an auxiliary package, dap-mode, for debugging), but I guess is somewhat more brittle because of this. dap-mode I do use, by the way (for python mainly) - functionality-wise it's my favourite debugger available in Emacs. eglot further has a single developer who already assigns copyright to the FSF (and developed other packages, like flymake, which are already part of emacs), so it has that going for it as well.
- zozbot234 4y agoThe main difference is that eglot doesn't support the complete set of LSP features yet, but those it does support are better integrated with the existing Emacs codebase and featureset. It's very much a work in progress, not aiming to be a self-contained thing like lsp-mode.
- wakeupcall 4y agoHaving alternate implementations is never a bad thing. I spent some time to get lsp-mode working earlier this year. It took me more time to declutter the amount of stuff it put on screen than what it took to setup. In fact they have a page about this https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-o... After turning off 2/3 of these, the experience has been stable and supports almost everything. I experienced clangd crashes, but lsp-mode was always able to recover. I'm not too fond of the reliance of treemacs (don't particularly like treemacs behavior in general). I just tried briefly eglot. It worked right out of the box, and the default "output" on screen seems to match what I left enabled for lsp-mode, which seems sane to me. xref integration seems to highlight methods with cc-mode (lsp-mode doesn't). Some lsp features are missing. For example I couldn't find an equivalent for "incoming call hierarchy". Not a show stopper. I would need to spend some good time to see which one provides less overhead, for example.
- morelisp 4y ago> It took me more time to declutter the amount of stuff it put on screen than what it took to setup. Same. lsp-mode is great if you want to use a distraction-filled UI that doesn't integrate with anything else in the Emacs world. My first thought on trying it was "you're showing me three epitexts by default and yet none of them are running through eldoc." A large number of people seem to want that, god help them.
- nverno 4y agolsp-mode does integrate with eldoc, you just need to configure what it shows in the minibuffer, eg. to turn of the excessive clutter, set these to nil lsp-signature-render-documentation nil ;ridiculously shows entire doc in mini lsp-eldoc-render-all nil ; if t, shows all hover info in eldoc - too much
- josteink 4y ago> Same here. Anyone know if eglot is "better" than lsp-mode? Or was it just picked because of some licensing reason? I just checked, and both are licensed as GPLv3. I guess it could be this copyright-assignment thing? Either way because of this move, I decided to try eglot over lsp-mode. First thing which happens is that eglot complains its can't find a language-server for the major-mode I'm working in now... And it does *not* offer to automatically install one. Based on this alone, I would say for OOB experience lsp-mode still seems leaps and bounds better.
- deleted 4y ago[deleted]
- jhoechtl 4y ago> First thing which happens is that eglot complains its can't find a language-server for the major-mode I'm working in now That was also my experience. Eglot wasn't able to use the installed vscode-json-languageserver for editing JSON instead insisted that typescript is is not installed. lsp-mode worked worked without any configuration out of the box
- sreevisakh 4y agoI used lsp-mode for a while and then switched to eglot. The reason was that lsp-mode has quite a lot of dependencies including helm and hydra. This can be inconvenient when you use their alternatives likes the vertico-corfu stack. I didn't want more than one extension of the same type in my configuration. eglot uses native emacs APIs for completions and tooltips. This integrates very well with vertico and corfu. > Also I wonder: if eglot is now part of Emacs, is there any incentive for the lsp-mode devs to keep working on lsp-mode? I'm pretty sure that some people will stick to lsp-mode. There are a few builtin extensions which I replaced with more popular external packages (eg: projectile vs project.el). So, I think the lsp-mode devs should keep at it.
- aardvark179 4y agoLsp mode depends on neither helm, nor hydra. I think there are some utility things that can use helm, but as far as I remember it that didn’t require that helm was set up for anything else and it has never conflicted with anything else I use.
- jacobsenscott 4y agolsp-mode does not depend on helm or hydra, or anything else really. There are optional packages that allow it to work better with those systems though. https://emacs-lsp.github.io/lsp-mode/page/installation/#vanilla-emacs https://emacs-lsp.github.io/lsp-mode/page/installation/#vani...
- wakeupcall 4y ago> (eg: projectile vs project.el). Always curious of why you prefer one of the other. Any major thing you prefer projectile? (only ever used project.el here and was satisfied) Similarly, I'm using ivy, first time I see vertico which looks similar.
- ghosty141 4y agoIt has a working switch to cpp/hpp function that you cant really get otherwise. Thats the only thing I miss from projectile.
- tptacek 4y agoPresumably eglot was picked because it's by far the more emacsy LSP client. It does most of its user-visible job by integrating with other built-in packages, like Flymake, ElDoc, project.el, and most importantly xref. Integrating lsp-mode would make much less sense, since you'd be integrating an alternative universe of packages that already have built-in analogs.
- ghosty141 4y agoFlymake is my biggest gripe with eglot. Sadly you cant really switch it out with flycheck
- tptacek 4y agoI thought this would annoy me, since I had a custom flycheck setup for years and years prior to eglot, but I haven't noticed any differences in my workflow; it just works.
- morelisp 4y agoWas `flycheck-list-errors` not part of your workflow, or do you have a decent replacement for it? Its lack is my one gripe with flymake.
- mickeyp 4y agoHave you tried `M-x flymake-show-project-diagnostics'?
- morelisp 4y agoYes; as far as I can tell it runs afoul of unresolvable project.el incompatibilities unless you're using at least Emacs 28.
- BaculumMeumEst 4y ago
- oehtXRwMkIs 4y agoAt least for web development I believe eglot is strictly worse. It does not support running multiple servers (e.g. tsserver and eslint-ls) (https://github.com/joaotavora/eglot/issues/976 https://github.com/joaotavora/eglot/issues/976) which is supported by lsp-mode and neovim's built-in lsp client. Also, it does not have any equivalent to dap-mode which is lsp-mode only. Although worth noting dap-mode is currently useless for js (https://github.com/emacs-lsp/dap-mode/issues/369 https://github.com/emacs-lsp/dap-mode/issues/369).
- PuercoPop 4y agoWhy would one want to run eslint through an LSP? Using flymake it call the CLI works just fine and is more direct.
- jrockway 4y agoWhy wouldn't you want the lint error to be highlighted right as you type the code? gopls has staticcheck and govet warnings; they are quite useful as you're typing in your code. (Though sometimes a little aggressive. My favorite is highlighting an if statement as an "empty branch" before I've had time to type in any code. I'm working as fast as I can, Mr. Linter!)
- morelisp 4y ago> Why wouldn't you want the lint error to be highlighted right as you type the code? eslint's flymake integration can do this without any language server commitments. LSP maybe offers some performance advantage - but IMO that says more about eslint than LSP or flymake.
- PuercoPop 4y ago> Why wouldn't you want the lint error to be highlighted right as you type the code? Why do you think you need to involve an LSP for that?. ESLint, as most linters, can take their input from stdin. That is exactly how the eslint-flymake[0] works. Lint on buffer contents, not file on disk. No JSON RPC involved. 0: https://github.com/emacs-pe/eslint-flymake/ https://github.com/emacs-pe/eslint-flymake/
- PuercoPop 4y agoEglot was written with the explicit goal of landing into Emacs. Which is why from the start it required copyright assignment for non trivial changes. Landing into Emacs core was never a goal for lsp. So it wasnt a choice between eglot vs lsp. It was eglot, yay or nay.
- eddieh 4y agoIf Eglot is the Emacs blessed package I'll probably start using it over lsp-mode, but seriously how do I pronounce "Eglot"? Egg Lot? Ah-lot? A-lot? Ehh-lot? Eh-glot? I never tried Eglot simply because the name made me think it was less serious.
- rogual 4y agoE as in Emacs, glot as in polyglot?
- eddieh 4y agoThat sounds too close to EGOT https://en.wikipedia.org/wiki/List_of_EGOT_winners https://en.wikipedia.org/wiki/List_of_EGOT_winners
- frou_dh 4y agoThe clever thing is that it's also eglot as in polyglot.
- FPGAhacker 4y agoThat makes sense, and never occurred to me. I was in the egg-lot camp
- yellowapple 4y agoI'm partial to rhyming it with escargot, myself.