From dc9a9953951897bd01ba77cea0be4b09bd8e53f7 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Wed, 22 Nov 2023 16:33:14 -0500 Subject: [PATCH] update texlab settings --- lua/lsp.lua | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lua/lsp.lua b/lua/lsp.lua index c98e739..9467e31 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -4,6 +4,7 @@ local lsp = require('lsp-zero').preset({ manage_nvim_cmp = true, suggest_lsp_servers = false, }) +local lspconfig = require('lspconfig') local keybindings = require('keybindings') local on_attach = keybindings.on_attach @@ -57,10 +58,22 @@ lsp.configure('html', { cmd = { "npx", "vscode-html-language-server", "--stdio" }, }) -lsp.configure('texlab', { - forwardSearch = { - executable = 'zathura', - args = { '--synctex-forward', '%l:1:%f', '%p' } +lspconfig.texlab.setup({ + settings = { + texlab = { + auxDirectory = '.', + bibtexFormatter = 'texlab', + forwardSearch = { + executable = 'zathura', + args = { '--synctex-forward', '%l:1:%f', '%p' } + }, + build = { + executable = "tectonic", + args = { '-X', 'compile', '%f', '--synctex', '--keep-logs', '--keep-intermediates' }, + onSave = true, + forwardSearchAfter = true, + }, + }, }, })