summaryrefslogtreecommitdiff
path: root/tex.lua
blob: aad70e33bee44b2b3f5a7be21a880a85de64d690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
return {
	{
		"lervag/vimtex",
		ft = { "tex", "bib", "latex" }, -- lazy-load on LaTeX files
		config = function()
			-- General vimtex settings
			vim.g.vimtex_view_method = "zathura" -- PDF viewer
			vim.g.vimtex_compiler_method = "latexmk" -- compiler
			vim.g.vimtex_quickfix_mode = 0 -- disable quickfix
			vim.g.vimtex_compiler_latexmk = {
				options = {
					"-pdf",
					"-interaction=nonstopmode",
					"-synctex=1",
				},
			}

			-- Optional: F5 for compiling
			vim.api.nvim_set_keymap("n", "<F5>", ":VimtexCompile<CR>", { noremap = true, silent = true })
		end,
	},
}