mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-01 16:45:00 +02:00
refactor tex to use ftplugin only
This commit is contained in:
parent
cdce596bc0
commit
6d17635b31
3 changed files with 26 additions and 28 deletions
|
@ -6,3 +6,29 @@ 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 = { "<cmd>VimtexCompile<cr>", "Toggle Compilation Mode" },
|
||||
f = { "<cmd>call vimtex#fzf#run()<cr>", "Fzf Find" },
|
||||
i = { "<cmd>VimtexInfo<cr>", "Project Information" },
|
||||
s = { "<cmd>VimtexStop<cr>", "Stop Project Compilation" },
|
||||
t = { "<cmd>VimtexTocToggle<cr>", "Toggle Table Of Content" },
|
||||
v = { "<cmd>VimtexView<cr>", "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
|
||||
)
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_fold_enabled = 0
|
||||
|
||||
O.user_which_key["L"] = {
|
||||
name = "+Latex",
|
||||
c = { "<cmd>VimtexCompile<cr>", "Toggle Compilation Mode" },
|
||||
f = { "<cmd>call vimtex#fzf#run()<cr>", "Fzf Find" },
|
||||
i = { "<cmd>VimtexInfo<cr>", "Project Information" },
|
||||
s = { "<cmd>VimtexStop<cr>", "Stop Project Compilation" },
|
||||
t = { "<cmd>VimtexTocToggle<cr>", "Toggle Table Of Content" },
|
||||
v = { "<cmd>VimtexView<cr>", "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
|
||||
)
|
|
@ -248,9 +248,6 @@ return require("packer").startup(function(use)
|
|||
use {
|
||||
"lervag/vimtex",
|
||||
ft = "tex",
|
||||
config = function()
|
||||
require "lv-vimtex"
|
||||
end,
|
||||
}
|
||||
|
||||
-- Rust tools
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue