Hacker News new | ask | show | jobs
by math0ne 2096 days ago
Emacs needs this so bad but I really believe it could never attract enough people to develop and maintain it without sane defaults.
1 comments

I find that lsp-mode works pretty well most of the time. If you look at the commit history, the project is very active. It's also pretty easy to set up.
I found that it didn't work out of the box for me (Rust and Python) but that eglot did work out of the box.

Eglot, not lsp-mode, will be the LSP implementation that makes it into the GNU Emacs distribution (because it is being developed with FSF assignments, and because the maintainer is active in the GNU Emacs development community, maintaining eldoc and flymake, and maybe others).

It would be bad if it did, IMO. Eglot is a pretty dodgy piece of software and the code is much worse than lsp-mode.
Could you give some justification for that criticism and assertion please? (On its own, your comment falls short of HN standards.)
Sure, here are some samples from the source.

This is Eglot's code. Try and figure out what's happening in each of these passages:

https://github.com/joaotavora/eglot/blob/master/eglot.el#L41...

https://github.com/joaotavora/eglot/blob/master/eglot.el#L41...

https://github.com/joaotavora/eglot/blob/master/eglot.el#L17...

Contrast with lsp-mode:

https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.e...

https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.e...

https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-modeli...

The lsp-mode code is a lot easier to follow, in my opinion. It's a lot clearer what's happening (although I can't say much about whether either are overabstracted which is admittedly a big concern. I haven't looked into that).

I remember watching an argument between the original authors on Reddit a while back. The lsp-mode author came across as... let's just say more professional. lsp-mode seems much closer to a professional product to me in general.

Thanks. It's true that the eglot code is hard to understand (and based on your links I suspecter hard_er_). I had been provisionally assuming that that was because the author is a much more advanced lisp programmer than me (which is true; I'm fairly sure he's one of those emacs developers that is also an experienced common lisp developer).

In any case, I would prefer that neither become part of GNU Emacs since then the development process and code review will become completely opaque (I'm not sure code review is really a thing once it's in Emacs. Just maintainers with push rights to some repo on savannah or something)

Also it's low resolution, but note the issues ratio.

Eglot: 70 open, 277 closed

lsp-mode: 94 open, 977 closed

(lsp-mode is much more than 3x the size of eglot and has 15x the number of downloads on MELPA)