fix(nvim): simplified setup

This commit is contained in:
Barrett Ruth 2026-03-05 22:08:14 -05:00
parent 36a88dc982
commit 615f4c1868
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -308,6 +308,7 @@ return {
end,
})
vim.api.nvim_create_autocmd('CursorHold', {
group = vim.api.nvim_create_augroup('APreviewSynctex', { clear = true }),
pattern = '*.tex',
callback = function()
local pdf = synctex_pdf[vim.api.nvim_get_current_buf()]
@ -329,22 +330,13 @@ return {
mermaid = true,
latex = {
open = { 'sioyek', '--instance-name', 'preview' },
extra_args = { '-outdir=build' },
output = function(ctx)
return vim.fn.fnamemodify(ctx.file, ':h')
.. '/build/'
.. vim.fn.fnamemodify(ctx.file, ':t:r')
.. '.pdf'
end,
args = function(ctx)
return {
'-pdf',
'-interaction=nonstopmode',
'-synctex=1',
'-outdir=build',
'-pdflatex=pdflatex -file-line-error -interaction=nonstopmode %O %S',
ctx.file,
}
end,
},
}
end,