add vimtex configuration

This commit is contained in:
Fabrice Mouhartem 2023-12-24 12:03:32 +01:00
parent 50bdcab579
commit 050a484742
2 changed files with 14 additions and 0 deletions

10
ftplugin/tex.lua Normal file
View File

@ -0,0 +1,10 @@
-- vimtex configuration
vim.g.vimtex_view_method = 'zathura'
vim.g.maplocalleader = ' '
-- Legacy shortcut from my vim-latexsuite days
vim.api.nvim_set_keymap("n", "<Leader>ls", ":VimtexView<CR>", {noremap = true, silent = true, desc = 'View [L]atex Document'})
vim.o.foldmethod = 'expr'
vim.o.foldexpr='vimtex#fold#level(v:lnum)'
vim.o.foldtext='vimtex#fold#text()'
vim.o.spell = true

View File

@ -7,6 +7,10 @@ for key, binding in pairs(map_list) do
vim.api.nvim_set_keymap("n", key, binding .. "<CR>", {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", key, binding .. "<CR>", {noremap = true, silent = true})
end end
-- spelling maps
vim.api.nvim_set_keymap("n", "<Leader>s", "mz[s1z=`z", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "à", "]s", {noremap = true, silent = true})
-- [[ kickstart.nvim ]] -- [[ kickstart.nvim ]]
-- Keymaps for better default experience -- Keymaps for better default experience
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`