logoalt Hacker News

yunnpptoday at 1:36 AM3 repliesview on HN

Is Eglot on par with emacs-lsp for C++? Specifically thinking about pointing it to a compile_commands.json and all of the usual C++ nonsense required for code navigation and autocomplete.


Replies

gpderettatoday at 11:10 AM

Pretty much yes. I switched to eglot from emacs-lsp because of some frequent random errors ("document not added") that required me to frequently kill clangd; might be a PEBCAK problem, but went away with eglot.

Everything mostly worked out of the box.

internet_pointstoday at 9:37 AM

I use it that way. It requires less setup than lsp-mode. Just try it – add `:disabled t` to your use-package lsp-mode, restart emacs and type `M-x eglot` in a C++ buffer.

Ferret7446today at 2:06 AM

The UX will be different and is a matter of preference. The performance depends solely on your LSP. So long as your LSP is the same and configured the same, it will give you the same results for navigation/completion.