summaryrefslogtreecommitdiff
path: root/lua/lv-vimtex/init.lua
diff options
context:
space:
mode:
authorLuc Sinet <[email protected]>2021-06-26 20:18:14 +0200
committerGitHub <[email protected]>2021-06-26 14:18:14 -0400
commit15d194ce0982f270a56807b06572e9c55233bce6 (patch)
tree6f345debf8327e7f57622007d621919e7eb132d1 /lua/lv-vimtex/init.lua
parent1c869402c1413341fead39d5aa3688b25cffe4f1 (diff)
Add Vimtex for Latex support (#512)
* Add vimtex plugin Vimtex provides a full integration for latex files, see: https://github.com/lervag/vimtex. Zathura is used as default pdf viewer as it allows live reloading. * Provide the <leader>L shortcut for Latex operations. * Move vimtex into the extra plugins section Add a short comment above extra plugins to introduce their functionality * Only define whcihKey mapping for Vimtex if O.extras is true Co-authored-by: Christian Chiarulli <[email protected]>
Diffstat (limited to 'lua/lv-vimtex/init.lua')
-rw-r--r--lua/lv-vimtex/init.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/lv-vimtex/init.lua b/lua/lv-vimtex/init.lua
new file mode 100644
index 00000000..f4d1cc0c
--- /dev/null
+++ b/lua/lv-vimtex/init.lua
@@ -0,0 +1,15 @@
+vim.g.vimtex_compiler_method='latexmk'
+vim.g.vimtex_view_method='zathura'
+vim.g.vimtex_fold_enabled=0
+
+-- 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
+)
+