To work with LaTeX, you need a compiler. In Linux we typically use texlive
, for more information you can read the TexLive Arch Wiki Page and the texlive package group.
A basic setup is obtained by installing the whole group.
sudo pacman -S texlive
From this, your selected LaTeX editor should pick up the latex
command in PATH.
latex --version
To have LaTeX support in neovim, install the vimtex
plugin using your preferred plugin manager.
Install
zathura
andzathura-pdf-mupdf
to render your PDF and have additional features.
Additionally, you might want to setup an equivalent for the following:
nvim-cmp
) that connects with vimtex
.LuaSnip
).friendly-snippets
).The spellcheck consumes a lot of RAM. You have been warned.
To have an LSP intended for LaTeX that checks spelling and grammar, in neovim you can install the ltex-ls
LSP through your package manager. If you have lspconfig
and mason
installed, you can run
:MasonInstall ltex-ls
Additionally, you will need a Java runtime
sudo pacman -S jdk21-openjdk
Note that
ltex-ls
is not compatible with Java 24, hence I suggestedjdk21-openjdk
previously. If you already had a java runtime installed with Java 24, install Java 21 alongside it and runsudo archlinux-java set java-21-openjdk
Use your LSP configuration and picker of choice to interact with the diagnostics and fixes.