up
This commit is contained in:
45
ftplugin/tex.lua
Normal file
45
ftplugin/tex.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
--[[--
|
||||
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
|
||||
|
||||
-- Shortcuts
|
||||
--
|
||||
-- old way making the LaTeX menu appears with the LSP and Lunar one
|
||||
-- whk.register {
|
||||
-- ["<leader>L"] = {
|
||||
-- name = "LSP, Lunar, LaTeX", -- we edit the title of the L shortcut
|
||||
-- }
|
||||
-- }
|
||||
|
||||
vim.g.maplocalleader = ' ' -- we define a leader available only from tex files
|
||||
|
||||
whk.add {
|
||||
{ '<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' },
|
||||
}
|
||||
Reference in New Issue
Block a user