Skip to content

feature: custom heading icons depending on filetype #320

@petobens

Description

@petobens

Is your feature request related to a problem? Please describe.

Currently we can define heading icons like:

    heading = {
        sign = false,
        icons = { '󰪥 ', '󰺕 ', '', '', '', '' },
        position = 'inline',
    },

and enable render-markdown for filetypes by doing

file_types = { 'markdown', 'chatgpt', 'chatgpt-input', 'codecompanion' },

Describe the solution you'd like

I was wondering whether it would be possible to add the ability to have different heading icons per filetype. In particular I'm using render-markdown with codecompanion ai plugin. The codecompanion markdown chat ui buffer looks like:

Image

where the light blue headers are simply markdown H2 headers. I would love to be able to do something similar to checkbox/links icons for markdown headings:

heading = {
    custom = {
        h2_codecompanion = {
            raw = '##',
            rendered = 'some_icon',
            highlight = 'some_highlight',
            ft = 'codecompanion',
        },

Describe alternatives you've considered

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions