Updated vimtex and snippets

This commit is contained in:
Minhazul Haque 2024-03-02 19:25:49 +06:00
parent 84a6b218fe
commit 10bf23a6ec
44 changed files with 4209 additions and 69 deletions

View file

@ -8,22 +8,62 @@ return {
build_dir = 'build',
executable = 'latexmk',
options = {
'-pdf',
'-pdflua',
'-interaction=nonstopmode',
'-synctex=1',
'-file-line-error',
'-verbose',
},
}
-- Enable automatic compilation on save
vim.g.vimtex_autocompile = {
callback = 1,
continuous = 1,
on_insert_leave = 1,
}
-- Turn off VimTeX indentation
-- vim.g.vimtex_indent_enabled = 0
-- Disable default mappings; I'll define my own
-- vim.g.vimtex_mappings_enabled = 0
-- Disable insert mode mappings (in favor of a dedicated snippet engine)
-- vim.g.vimtex_imaps_enabled = 0
-- Disable syntax conceal
vim.g.vimtex_syntax_conceal_disable = 0
-- Default is 500 lines and gave me lags on missed key presses
vim.g.vimtex_delim_stopline = 50
-- VimTeX toggle delimeter configuration
vim.g.vimtex_delim_toggle_mod_list = {
{'\\left', '\\right'},
{'\\big', '\\big'},
}
-- Don't open quickfix for warning messages if no errors are present
vim.g.vimtex_quickfix_open_on_warning = 0
--Disable some compilation warning messages
vim.g.vimtex_quickfix_ignore_filters = {
'LaTeX hooks Warning',
'Underfull \\hbox',
'Overfull \\hbox',
'LaTeX Warning: .+ float specifier changed to',
'Package siunitx Warning: Detected the "physics" package:',
'Package hyperref Warning: Token not allowed in a PDF string',
'Fatal error occurred, no output PDF file produced!',
}
-- Enable PDF preview using your favorite PDF viewer
vim.g.vimtex_view_method = 'zathura'
vim.g.vimtex_view_method = 'zathura_simple'
-- vim.g.vimtex_view_general_viewer = 'okular'
-- vim.g.vimtex_view_general_options = '--unique file:@pdf\\#src:@line@tex'
end,
-- Define the VimtexHookZathura function
end,
}