nvim-config/lua/plugins/texlabconfig.lua

52 lines
1.3 KiB
Lua
Raw Normal View History

2023-02-10 21:20:55 -08:00
return {
"f3fora/nvim-texlabconfig",
build = "go build",
dependencies = { "lervag/vimtex" },
config = function()
-- vimtex
2024-11-17 14:50:40 -08:00
vim.g.vimtex_view_method = "sioyek"
2023-02-10 21:20:55 -08:00
vim.g.vimtex_compiler_method = "tectonic"
-- nvim-texlabconfig
2024-11-17 14:06:19 -08:00
local tex_preview_executable = "zathura"
local tex_preview_args = {
2024-11-17 14:50:40 -08:00
"--reuse-window",
"--execute-command",
"toggle_synctex", -- Open Sioyek in synctex mode.
"--inverse-search",
[[nvim-texlabconfig -file %%%1 -line %%%2 -server ]] .. vim.v.servername,
"--forward-search-file",
"%f",
"--forward-search-line",
"%l",
2024-11-17 14:06:19 -08:00
"%p",
}
2023-02-10 21:20:55 -08:00
local texlab_build_executable = "tectonic"
local texlab_build_args = {
"-X",
"compile",
"%f",
"--synctex",
"--keep-logs",
"--keep-intermediates",
}
require("texlabconfig").setup({
cache_activate = true,
cache_filetypes = { "tex", "bib" },
reverse_search_edit_cmd = vim.cmd.edit,
settings = {
texlab = {
build = {
executable = texlab_build_executable,
args = texlab_build_args,
},
forwardSearch = {
executable = tex_preview_executable,
args = tex_preview_args,
},
},
},
})
end,
}