Hacker News new | ask | show | jobs
by hnrj95 1652 days ago
lsp mode is great, but i prefer eglot. both are definitely worth looking into
1 comments

Ok, I must have been living under a rock. I'm quite overwhelmed that there are 2 implementations of LSP for emacs. That's fantastic!

Why do you say you prefer eglot over lsp-mode?

I am not the person you asked, but I also use both lsp-mode and eglot and prefer eglot overall by a very small margin.

The main reason I prefer eglot is because it's much more integrated with emacs and in general a lot less complicated. An example, is eglot shows markdown formatted doc strings in the minibuffer with eldoc rather than opening a webkit based child frame like lsp-mode/lsp-ui does. It also uses the built in flymake package for displaying errors on the fly rather than flycheck (though lsp-mode can use flymake as well).

With this being said, lsp-mode is also a very nice package, and in some ways better than eglot. You could even consider the previous points advantages depending on what type of software you prefer. An example of lsp-mode using non-native packages/features in an advantageous way is it's integration with projectile. I've had many issues with eglot not being able to accurately determine the project's root due to limitations in emacs native project.el, with projectile you can just drop a ".projectile" file in the project root and it detects this automatically.

Overall they are very different packages, even though they are both lsp clients. It's really impossible to say that one is objectively better than the other, and I would recommend trying both out yourself to see which you prefer