--[[-- File : conf.d/lvim/ftplugin/tex.lua Author : Jeff Lance Date : 06.08.2023 11:07:22 Last Modified Date: 15.08.2023 00:46:47 Last Modified By : Jeff Lance --]] -- local opts = {} local status_ok, whk = pcall(require, "which-key") if not status_ok then return end -- Shortcuts -- -- vim.g.maplocalleader = " " whk.register { ["L"] = { name = "LSP, Lunar, LaTeX", -- we edit the title of the L shortcut } } whk.register { ["Lx"] = { name = "LaTeX", c = { "VimtexCompileSS", "Single-shot compile project" }, C = { "VimtexCompileSelected", "Compile Selected" }, D = { "VimtexDocPackage", "Open Doc for package" }, e = { "edit /home/jeff/.config/lvim/luasnippets/tex.lua", "Edit snippets" }, E = { "VimtexErrors", "Look at the errors" }, I = { "VimtexInfo", "Vimtex Info" }, K = { name = "Clean", p = { "VimtexClean", "Clean Project" }, c = { "VimtexClean", "Clean Cache" }, }, m = { "VimtexToggleMain", "Toggle Main" }, R = { name = "Reload", r = { "VimtexReload", "Reload" }, s = { "VimtexReloadState", "Reload State" }, }, s = { "VimtexStop", "Stop compile" }, S = { "VimtexStatus", "Look at the status" }, T = { name = "TOC", o = { "VimtexTocOpen", "Open TOC" }, t = { "VimtexTocToggle", "Toggle TOC" }, }, v = { "VimtexView", "View pdf" }, } } -- 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" } }, })