Skip to content
MeanderingProgrammer edited this page Oct 15, 2024 · 11 revisions

Tables

Raw data being used:

# Table

| `Left` | *Center* | Right  | Default |
|  :---  | :----:   |-------:| --------|
| `Code` | **Bold** | ~~Strike~~ |Item     |
| Item   | [Link](/test) | Item   |  Item   |
|       1| 2        | 3      | 4       |

Default

require('render-markdown').setup({
    pipe_table = {
        enabled = true,
        preset = 'none',
        style = 'full',
        cell = 'padded',
        padding = 1,
        min_width = 0,
        border = {
            '', '', '',
            '', '', '',
            '', '', '',
            '', '',
        },
        alignment_indicator = '',
        head = 'RenderMarkdownTableHead',
        row = 'RenderMarkdownTableRow',
        filler = 'RenderMarkdownTableFill',
    },
})

Style Normal

require('render-markdown').setup({
    pipe_table = { style = 'normal' },
})

Min Width

require('render-markdown').setup({
    pipe_table = { min_width = 12 },
})

Round Border

require('render-markdown').setup({
    pipe_table = { preset = 'round' },
})

Double Border

require('render-markdown').setup({
    pipe_table = { preset = 'double' },
})

Heavy Border

require('render-markdown').setup({
    pipe_table = { preset = 'heavy' },
})

Custom Border

require('render-markdown').setup({
    pipe_table = {
        border = { '', '', '', '', '', '', '', '', '', '', '' },
    },
})

Alignment Indicator

require('render-markdown').setup({
    pipe_table = { alignment_indicator = '' },
})

Cell Trimmed

require('render-markdown').setup({
    pipe_table = { cell = 'trimmed' },
})

Cell Raw

require('render-markdown').setup({
    pipe_table = { cell = 'raw' },
})

Cell Overlay

require('render-markdown').setup({
    pipe_table = { cell = 'overlay' },
})
Clone this wiki locally