A comprehensive setup script and configuration for NeoVim with LaTeX support on Arch Linux.
- Complete NeoVim installation with modern plugin manager (lazy.nvim)
- LaTeX environment with TexLive
- LSP support for LaTeX with texlab
- Snippet support with LuaSnip
- PDF viewer integration with Zathura
- Git integration and version control
- Modern UI with telescope, treesitter, and more
- Clone this repository:
git clone [email protected]:jorgemunozl/arch-nvim-latex.git
cd arch-nvim-latex
- Run the setup script:
chmod +x setup.sh
./setup.sh # interactive
./setup.sh --yes # non-interactive (medium)
./setup.sh --level full --yes --skip-aur # example with flags
-
When prompted, choose your LaTeX installation level:
- Minimal: Only core and basic LaTeX packages (smallest, fastest)
- Medium: Core + recommended + math + fonts (recommended for most users)
- Full: Everything (all available LaTeX packages, largest install)
-
Start NeoVim and enjoy your LaTeX environment!
When you run setup.sh
, you will be asked to choose one of three LaTeX installation levels:
- Minimal: Installs only the essential LaTeX packages for basic documents. Fastest and smallest.
- Medium: Installs core, recommended, math, and font packages. Suitable for most users and most documents.
- Full: Installs all available LaTeX packages. Largest install, but ensures you never run into missing packages.
You can always add more packages later using pacman
or tlmgr
as your needs grow.
Installation Type | Approximate Size |
---|---|
Minimal | ~200 MB |
Medium | ~700 MB |
Full | ~2–3 GB |
These are rough estimates and may vary depending on updates and dependencies. You can always expand your installation later as needed.
- NeoVim (latest version)
- TexLive (core and selected package groups based on your installation level)
- texlive-binextra (important for extra utilities like latexmk)
- Zathura (PDF viewer)
- Git and development tools
- Python and Node.js for LSP servers
- Modern plugin manager (lazy.nvim)
- LSP configuration for LaTeX
- Treesitter syntax highlighting
- Telescope fuzzy finder
- File explorer with nvim-tree
- Git integration with fugitive
- LaTeX-specific snippets and keybindings
- texlab LSP server
- VimTeX plugin for LaTeX support
- Live preview capabilities
- Create a new
.tex
file - Use
<leader>ll
to start live compilation - Use
<leader>lv
to open PDF viewer - Use
<leader>lc
to clean auxiliary files
<leader>ff
- Find files with Telescope<leader>fg
- Live grep with Telescope<leader>e
- Toggle file explorer<leader>gg
- Open Git status<leader>ll
- LaTeX live compilation<leader>lv
- LaTeX view PDF
- Location:
~/.config/nvim/snippets
(installed bysetup.sh
) - Expand/jump: Tab or Ctrl-l
- Jump back: Shift-Tab or Ctrl-h
- Choice nodes: Ctrl-k
- Autosnippets (math): e.g.
@a
→\alpha
,fra
→\frac{…}{…}
,sq
→\sqrt{…}
- Reload without restarting:
:lua require('luasnip.loaders.from_lua').load({ paths = vim.fn.stdpath('config')..'/snippets/lua/' })
Edit the configuration files in nvim/
directory to customize your setup:
nvim/init.lua
- Main configurationnvim/lua/plugins/
- Plugin configurationsnvim/lua/config/
- Core settings
- Arch Linux (or Arch-based distribution)
- Internet connection for package installation
- At least 2GB free disk space
If you encounter issues:
- Check the latest install log (in this repo directory):
ls -1t install_*.log | head -n1 | xargs -r tail -n +1
- Verify all packages are installed:
./setup.sh --verify
- Reset NeoVim configuration:
./setup.sh --reset
- Snippets not expanding?
- Open a
.tex
buffer and run::lua print(#require('luasnip').get_snippets('tex'))
(should be > 0) - Reload snippets:
:lua require('luasnip.loaders.from_lua').load({ paths = vim.fn.stdpath('config')..'/snippets/lua/' })
- Ensure VimTeX is active (mathzone):
:echo exists('*vimtex#syntax#in_mathzone')
- Open a
Feel free to submit issues and pull requests to improve this setup.
MIT License - see LICENSE file for details.