if require("lv-utils").check_lsp_client_active "texlab" then return end require("lspconfig").texlab.setup { cmd = { DATA_PATH .. "/lspinstall/latex/texlab" }, on_attach = require("lsp").common_on_attach, } vim.g.vimtex_compiler_method = "latexmk" vim.g.vimtex_view_method = "zathura" vim.g.vimtex_fold_enabled = 0 O.plugin.which_key.mappings["L"] = { name = "+Latex", c = { "VimtexCompile", "Toggle Compilation Mode" }, f = { "call vimtex#fzf#run()", "Fzf Find" }, i = { "VimtexInfo", "Project Information" }, s = { "VimtexStop", "Stop Project Compilation" }, t = { "VimtexTocToggle", "Toggle Table Of Content" }, v = { "VimtexView", "View PDF" }, } -- Compile on initialization, cleanup on quit vim.api.nvim_exec( [[ augroup vimtex_event_1 au! au User VimtexEventQuit call vimtex#compiler#clean(0) au User VimtexEventInitPost call vimtex#compiler#compile() augroup END ]], false )