From 69e14f04227318f10483286fbc05c19c8b7abd71 Mon Sep 17 00:00:00 2001
From: "flyingscorpio@clevo" <tfranken@protonmail.com>
Date: Tue, 2 Aug 2022 10:16:14 +0200
Subject: [PATCH] Add vimtex plugin

---
 roles/neovim/files/lua/plugin_options.lua | 9 +++++++--
 roles/neovim/files/lua/plugins.lua        | 3 +++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/roles/neovim/files/lua/plugin_options.lua b/roles/neovim/files/lua/plugin_options.lua
index 2d4e822..bb09fce 100644
--- a/roles/neovim/files/lua/plugin_options.lua
+++ b/roles/neovim/files/lua/plugin_options.lua
@@ -1,4 +1,9 @@
 -- NERDTree
-
-vim.cmd("let NERDTreeIgnore=['^__pycache__$', '\\.pyc', '\\~$']")
+vim.g.NERDTreeIgnore = { '^__pycache__$', '\\.pyc', '\\~$' }
 vim.keymap.set('n', '<leader>ne', '<cmd>NERDTree<CR>', { remap = true })
+
+-- VimTex
+vim.g.tex_flavor = 'latex'
+vim.g.vimtex_view_method = 'zathura'
+vim.g.vimtex_quickfix_autoclose_after_keystrokes = 2
+vim.g.vimtex_quickfix_open_on_warning = 0
diff --git a/roles/neovim/files/lua/plugins.lua b/roles/neovim/files/lua/plugins.lua
index 924d403..b0bb1f1 100644
--- a/roles/neovim/files/lua/plugins.lua
+++ b/roles/neovim/files/lua/plugins.lua
@@ -20,6 +20,9 @@ return require('packer').startup(function(use)
     use 'preservim/nerdtree'
     use 'Xuyuanp/nerdtree-git-plugin' -- A NERDTree plugin showing git status
 
+    -- VimTeX
+    use 'lervag/vimtex'
+
     -- Automatically set up your configuration after cloning packer.nvim
     -- Put this at the end after all plugins
     if packer_bootstrap then