Formats markdown table under cursor when you leave insert mode or input |
.
lazy.nvim
{
'Kicamon/markdown-table-mode.nvim',
config = function()
require('markdown-table-mode').setup()
end
}
vim-plug
Plug 'Kicamon/markdown-table-mode.nvim'
lua require('markdown-table-mode').setup()
Run the :Mtm
command to toggle markdown table mode.
default config
require('markdown-table-mode').setup({
filetype = {
'*.md',
},
options = {
insert = true, -- when typing "|"
insert_leave = true, -- when leaving insert
pad_separator_line = false, -- add space in separator line
alig_style = 'default', -- default, left, center, right
},
})