pandoc: improve plugin config formatting

Co-Authored-by: iGor milhit <igor@milhit.ch>
iGor milhit 2024-08-06 19:40:11 +02:00
parent 6f5f205cca
commit ced3ca5466
Signed by: igor
GPG Key ID: 692D97C3D0228A99
1 changed files with 15 additions and 3 deletions

View File

@ -8,9 +8,21 @@ vim.cmd([[ let g:mkdp_filetypes = ['markdown', 'pandoc', 'pandoc.markdown'] ]])
vim.cmd([[ let g:pandoc#formatting#mode="hA" ]])
-- Keymaps to switch to soft or hardwarp, or to toggle.
vim.keymap.set('n', '<leader>sw', '<cmd>call pandoc#formatting#UseSoftWraps()<CR>', {desc = 'Switch to softwrap'})
vim.keymap.set('n', '<leader>hw', '<cmd>call pandoc#formatting#UseHardWraps()<CR>', {desc = 'Switch to hardwrap'})
vim.keymap.set('n', '<leader>tw', '<cmd>call pandoc#formatting#ToggleAutoformat()<CR>', {desc = 'Toggle autoformat, to deactivate it'})
vim.keymap.set('n',
'<leader>sw',
'<cmd>call pandoc#formatting#UseSoftWraps()<CR>',
{desc = 'Switch to softwrap'}
)
vim.keymap.set('n',
'<leader>hw',
'<cmd>call pandoc#formatting#UseHardWraps()<CR>',
{desc = 'Switch to hardwrap'}
)
vim.keymap.set('n',
'<leader>tw',
'<cmd>call pandoc#formatting#ToggleAutoformat()<CR>',
{desc = 'Toggle autoformat, to deactivate it'}
)
return {
{