All posts

Live diagnostics: catch LaTeX mistakes before you press Compile

With Pro, a LaTeX language server checks your document as you type: autocomplete for commands and labels, and warnings for problems a compile would only reveal later.

An undefined reference to fig:results underlined in the editor while the LSP indicator shows the language server is live.

The usual LaTeX loop goes: write, compile, read the error, fix, compile again. On a 60-page thesis, each round costs you a few seconds of compile time and, more importantly, your train of thought.

The language server shortens that loop. It reads your document while you type and tells you about problems where they happen.

What it does

When the language server is running, you'll see LSP in the editor header, with the tooltip "Language server connected — diagnostics are live." From then on you get:

  • Smarter autocomplete that understands your whole project: the commands and environments from the packages you've loaded, and the labels you've actually defined
  • Inline diagnostics: squiggly underlines for undefined references, unbalanced environments and other errors, before you compile
  • Style warnings from chktex, a widely used LaTeX linter: things like a missing non-breaking space before \cite or the wrong kind of dash

Three things it catches early

1. The reference to a label you renamed. You changed \label{fig:results} to \label{fig:accuracy} last week. Three sections later, \ref{fig:results} still prints as ?? in the PDF. The language server flags it as you write.

2. The environment you never closed. An \begin{align} with no matching \end{align} can produce an error 200 lines later. Diagnostics point at the real cause.

3. The citation key with a typo. \cite{lamport1994latx} gets underlined straight away instead of appearing as a bold [?] in the final PDF.

Is it worth it?

Why it's a Pro feature

Keeping it on Pro lets us give it the resources to be fast. Pro includes up to two language-server sessions at once, so you can keep two projects open with live diagnostics.
On the Free plan you still get explained compile errors: the same problems, reported after compiling instead of while typing.

If you write LaTeX a few times a month, the compile-and-fix loop is fine. If you're writing a thesis, or living in LaTeX for weeks before a deadline, catching mistakes as you type saves dozens of compile rounds a day. That's where Pro pays for itself.

See what's in Pro.