Skip to content
MeanderingProgrammer edited this page Feb 25, 2025 · 10 revisions

Links

Raw data being used:

# Links

- ![Image](test.png)
- [Markdown File](test.md)
- [Python File](test.py)
- [Website](https://test.com)
- [[wikilink]]
- [[wikilink|Wikilink Alias]]
- [Reference][example]
- <[email protected]>

Default

require('render-markdown').setup({
    link = {
        enabled = true,
        render_modes = false,
        footnote = {
            superscript = true,
            prefix = '',
            suffix = '',
        },
        image = '󰥶 ',
        email = '󰀓 ',
        hyperlink = '󰌹 ',
        highlight = 'RenderMarkdownLink',
        wiki = {
            icon = '󱗖 ',
            body = function()
                return nil
            end,
            highlight = 'RenderMarkdownWikiLink',
        },
        custom = {
            web = { pattern = '^http', icon = '󰖟 ' },
            discord = { pattern = 'discord%.com', icon = '󰙯 ' },
            github = { pattern = 'github%.com', icon = '󰊤 ' },
            gitlab = { pattern = 'gitlab%.com', icon = '󰮠 ' },
            google = { pattern = 'google%.com', icon = '󰊭 ' },
            neovim = { pattern = 'neovim%.io', icon = '' },
            reddit = { pattern = 'reddit%.com', icon = '󰑍 ' },
            stackoverflow = { pattern = 'stackoverflow%.com', icon = '󰓌 ' },
            wikipedia = { pattern = 'wikipedia%.org', icon = '󰖬 ' },
            youtube = { pattern = 'youtube%.com', icon = '󰗃 ' },
        },
    },
})

Image Icon

require('render-markdown').setup({
    link = { image = '󰋵 ' },
})

Email Icon

require('render-markdown').setup({
    link = { email = '' },
})

Link Icon

require('render-markdown').setup({
    link = { hyperlink = '󰌷 ' },
})

Python Icon

require('render-markdown').setup({
    link = {
        custom = {
            python = {
                pattern = '%.py$',
                icon = '󰌠 ',
            },
        },
    },
})
Clone this wiki locally