6 ms·
As a lsp-mode users, why switch to eglot?
by truncate 4y ago
As a lsp-mode users, why switch to eglot?
- NoGravitas 4y agoIf you're happy with lsp-mode, there's not much reason to switch. The main thing about eglot is that it's less-intrusive. It doesn't make any UI changes (unlike lsp-ui), and doesn't even install a keymap by default. But it hooks into Emacs' existing facilities (like xref and completion-at-point) and lets them use an lsp-powered backend. There are functions for things that don't already have an equivalent (like refactorings or code actions), but they're not bound.
- anyfoo 4y ago> like xref and completion-at-point Where does that persistence myth come from that lsp does not hook into that? Maybe it once did not, but I've been using lsp for at least a couple of years now and I do not remember it not using xref. Not so sure about completion-at-point, haven't checked because my completions work as they should using company.
- srcreigh 4y agoNever used LSP. Imo eglot is a test for your knowledge of other good packages. It won’t work nicely without turning on company-mode, flycheck-project-buffer (spelling?) etc. But it’s good to know about those anyway. LSP to me always seemed like a all-in-one don’t have to think of know what’s going on type of package. Depends what you want. I’ve found eglot to be hackable too. I had ugly Horizontal Rule in eldoc for rust code due to tamsyn font. Well eglot->eldoc-> some builtin markdown package -> finally discovered a config option for the character used to draw hr’s. On one hand it’s annoying to go 3 dependencies deep to configure eglot behaviour. But emacs makes that kinda thing accessible (if not easy) and I learned something.
- ParetoOptimal 4y agoUsing lsp within devcontainers/docker containers via tramp.