--[[-- File : conf.d/lvim/ftplugin/tex.lua Author : Jeff Lance Date : 06.08.2023 11:07:22 Last Modified Date: 08.08.2023 19:23:36 Last Modified By : Jeff Lance --]] -- local opts = {} local status_ok, whk = pcall(require, "which-key") if not status_ok then return end -- Shortcuts -- whk.register { ["l"] = { name = "LaTeX", m = { "VimtexContextMenu", "Open Context Menu" }, u = { "VimtexCountLetters", "Count Letters" }, w = { "VimtexCountWords", "Count Words" }, d = { "VimtexDocPackage", "Open Doc for package" }, e = { "VimtexErrors", "Look at the errors" }, s = { "VimtexStatus", "Look at the status" }, a = { "VimtexToggleMain", "Toggle Main" }, v = { "VimtexView", "View pdf" }, i = { "VimtexInfo", "Vimtex Info" }, l = { name = "Clean", l = { "VimtexClean", "Clean Project" }, c = { "VimtexClean", "Clean Cache" }, }, c = { name = "Compile", c = { "VimtexCompile", "Continuous compile project" }, o = { "VimtexCompileOutput", "Compile Project and Show Output", }, s = { "VimtexCompileSS", "Single-shot compile project" }, e = { "VimtexCompileSelected", "Compile Selected" }, }, r = { name = "Reload", r = { "VimtexReload", "Reload" }, s = { "VimtexReloadState", "Reload State" }, }, o = { name = "Stop", p = { "VimtexStop", "Stop" }, a = { "VimtexStopAll", "Stop All" }, }, t = { name = "TOC", o = { "VimtexTocOpen", "Open TOC" }, t = { "VimtexTocToggle", "Toggle TOC" }, }, } } -- Linters -- local linters = require("lvim.lsp.null-ls.linters") linters.setup({ { command = "chktex", filetypes = { "tex" } }, }) -- Formatters -- local formatters = require("lvim.lsp.null-ls.formatters") formatters.setup({ { command = "latexindent", filetypes = { "tex" } }, })