I don’t think I have enough words to express my admiration for Eglot. The more I use it, the more I appreciate its minimalist approach that just does the right thing and then gets out of my way. With the help of its maintainer João Távora and the friendly Felicián Németh, I have done my part to help keeping it up to speed with Eclipse JDT latest developments.1 I had to give back something, didn’t I?
Why stop at Java, though? Since I have come to enjoy the niceties of LSP, I decided to push it a little further and step outside my comfortable software developer zone to check how Eglot can improve on my experience with LaTeX. Albeit a bit early in my student’s career, I have followed a kind professor’s prompt to pursue some ideas of mine and have started working on my thesis. Mind you, I have been a happy AUCTeX user for quite a long time and I do not intend to leave it behind. How can Eglot fit in, then?2
The “don’t be silly, trust Emacs!” answer comes from Augusto Stoffel in the form
of digestif. If you are familiar with a
language server, you know what
digestif does. I like to think of it as AUCTeX
missing piece, because it offers completion, documentation, and navigation
commands that really make a difference when writing a non-trivial LaTeX
document. Furthermore, Augusto has recently added specific integration for
BibLaTeX,3 which turns inserting citation and footnotes into a nice and easy
task and it also means that I can safely disable RefTeX now.
digestif is just as painless as well: put the self-installing
$PATH, make it executable, and run it once. Or you can use
install digestif if you have
luarocks on your machine. Back in Emacs, Eglot
will take care of everything else. Try M-x eglot in your LaTeX
buffers if you don’t believe me.
When I first heard of LSP I wasn’t sure of what to do with it. Well, to a
certain degree I still am. For instance, I am not using
clojure-lsp even though I spend eight hours a day
with Clojure. However, when it comes to LaTeX I don’t think I am going to
abandon Eglot and
digestif any time soon. Whether or not you use AUCTeX, with
digestif the experience is simply more comfortable and, thus, better.