-- Pandoc plugins: vim-pandoc, vim-pandoc-syntax -- Defines the filetypes that have to be recognize by vim-pandoc. Allows -- mardown-preview to be available with pandoc filetype. vim.cmd([[ let g:mkdp_filetypes = ['markdown', 'pandoc', 'pandoc.markdown'] ]]) -- Sets the pandoc formatting mode to hardwrap vim.cmd([[ let g:pandoc#formatting#mode="hA" ]]) -- Keymaps to switch to soft or hardwarp, or to toggle. vim.keymap.set('n', 'sw', 'call pandoc#formatting#UseSoftWraps()', {desc = 'Switch to softwrap'}) vim.keymap.set('n', 'hw', 'call pandoc#formatting#UseHardWraps()', {desc = 'Switch to hardwrap'}) vim.keymap.set('n', 'tw', 'call pandoc#formatting#ToggleAutoformat()', {desc = 'Toggle autoformat, to deactivate it'}) return { { "vim-pandoc/vim-pandoc", ft = "pandoc", lazy = true, }, { "vim-pandoc/vim-pandoc-syntax", ft = "pandoc", lazy = true, }, }