From c0065fa9453be81748d02ef0fba7648e05b7eb07 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 17 Sep 2021 06:17:59 +0200 Subject: [PATCH] Feat: vimtex config --- nvim/.config/nvim/lua/config/vimtex.lua | 23 +++++++++++++++++++++++ nvim/.config/nvim/lua/plugins.lua | 1 + 2 files changed, 24 insertions(+) create mode 100644 nvim/.config/nvim/lua/config/vimtex.lua diff --git a/nvim/.config/nvim/lua/config/vimtex.lua b/nvim/.config/nvim/lua/config/vimtex.lua new file mode 100644 index 0000000..1c92e25 --- /dev/null +++ b/nvim/.config/nvim/lua/config/vimtex.lua @@ -0,0 +1,23 @@ +vim.g.maplocalleader = " " + +vim.g.vimtex_compiler_latex = {} +vim.g.vimtex_compiler_latex["backend"] = 'nvim' + +vim.g.vimtex_compiler_latex['backend'] = 'nvim' +vim.g.vimtex_compiler_latex['background'] = 1 +vim.g.vimtex_compiler_latex[ 'build_dir'] = '' +vim.g.vimtex_compiler_latex[ 'callback'] = 0 +vim.g.vimtex_compiler_latex[ 'continuous'] = 1 +vim.g.vimtex_compiler_latex[ 'options'] = { '-pdf', +'-verbose', +'-file-line-error', +'-synctex=1', +'-interaction=nonstopmode', +'-silent', +'-shell-escape', + } + +vim.g.vimtex_view_method = 'zathura' + +-- Les fichiers sty et cls sont vus comme des fichiers tex +vim.cmd("autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex") diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index a6ca439..2fd4bd5 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -73,6 +73,7 @@ return require('packer').startup(function() use { 'lervag/vimtex', + config = [[require('config.vimtex')]], } -- Highlight on Yank