diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index ce0ec39..7815fb4 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -62,7 +62,38 @@ local servers = { }, }, }, - texlab = {}, + texlab = { + filetypes = { "tex", "bib" }, + settings = { + texlab = { + auxDirectory = ".", + bibtexFormatter = "texlab", + build = { + args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }, + executable = "latexmk", + forwardSearchAfter = false, + onSave = false + }, + chktex = { + onEdit = false, + onOpenAndSave = false + }, + diagnosticsDelay = 300, + formatterLineLength = -1, + forwardSearch = { + args = {} + }, + latexFormatter = "latexindent", + latexindent = { + modifyLineBreaks = false + }, + forwardSearch = { + executable = "zathura", + args = { "--synctex-forward", "%l:1:%f", "%p"} + }, + }, + }, + }, } -- Default handlers for LSP diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100644 index 0000000..94d6a67 --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1,2 @@ +set synctex true +set synctex-editor-command "texlab inverse-search -i %{input} -l %{line}"