-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimtex.lua
30 lines (28 loc) · 838 Bytes
/
vimtex.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if vim.env.TERM == 'linux' then
vim.g.vimtex_syntax_conceal_disable = true
end
vim.g.vimtex_format_enabled = 1
vim.g.vimtex_imaps_enabled = 0
vim.g.vimtex_mappings_prefix = '<LocalLeader>l'
vim.g.vimtex_quickfix_ignore_filters = {
[[Warning]],
[[Overfull]],
[[Underfull]],
[[Font shape `.*' undefined]],
}
vim.api.nvim_create_autocmd('FileType', {
pattern = 'tex',
group = vim.api.nvim_create_augroup('VimTexFileTypeInit', {}),
callback = function(info)
-- Make surrounding delimiters large
vim.keymap.set('n', 'css', vim.fn['vimtex#delim#add_modifiers'], {
buffer = info.buf,
desc = 'Surround with large delimiters',
})
-- Remove default `]]` mapping in insert mode as it causes lagging
-- when typing `]`
pcall(vim.keymap.del, 'i', ']]', {
buffer = info.buf,
})
end,
})