Files
nvim-modular/ftplugin/tex.lua
2025-09-07 12:19:33 +02:00

38 lines
1.4 KiB
Lua

--[[--
File : conf.d/lvim/ftplugin/tex.lua
Author : Jeff Lance <email@jefflance.me>
Date : 06.08.2023 11:07:22
Last Modified Date: 15.08.2023 00:46:47
Last Modified By : Jeff Lance <email@jefflance.me>
--]]
--
local opts = {}
local status_ok, whk = pcall(require, 'which-key')
if not status_ok then
return
end
vim.g.maplocalleader = ' ' -- we define a leader available only from tex files
whk.add {
{ '<localleader>l', hidden = true },
{ '<localleader>L', '', group = '[L]aTeX' },
{ '<localleader>Lc', '<CMD>VimtexCompileSS<CR>', desc = 'Single-shot compile project' },
{ '<localleader>LC', '', group = '[C]ompile' },
{ '<localleader>LCs', '<CMD>VimtexStop<CR>', desc = 'Stop compile' },
{ '<localleader>LCc', '<CMD>VimtexCompileSelected<CR>', desc = 'Compile Selected' },
{ '<localleader>Ld', '<CMD>VimtexDocPackage<CR>', desc = 'Open Doc for package' },
{ '<localleader>Le', '<CMD>VimtexErrors<CR>', desc = 'Look at the errors' },
{ '<localleader>Lm', '<CMD>VimtexToggleMain <bar> let @+ = expand("%:t")<CR>', desc = 'Toggle Main' },
{ '<localleader>Lo', '<CMD>VimtexView<CR>', desc = 'View pdf' },
{ '<localleader>Ls', '<CMD>VimtexStatus<CR>', desc = 'Look at the status' },
{ '<localleader>LT', '', group = '[T]oc' },
{ '<localleader>LTo', '<CMD>VimtexTocOpen<CR>', desc = 'Open TOC' },
{ '<localleader>LTt', '<CMD>VimtexTocToggle<CR>', desc = 'Toggle TOC' },
}