Skip to content

Showing the language icon in rendered code blocks #1746

@sadtab

Description

@sadtab

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

The title says it all , something like python icon in MD rendering with markviews:

Image

Personally I prefer them to be at the left, and only icon

Background:

If the concealer module is configured like :

    ["core.concealer"] = {
      config = {
        icons = {
          code_block = {
            conceal = true, -- Hide @code and @end code markers
          },
        },
      },
    },

The entire @code LANGUAGE .... @end is hidden. I find the @code and @end somehow noisy, polluting and repetitive, specially when reading the notes, but the Language type at least it's icon is informative and useful to keep visible while concealing the boiler plate @code...@end, a perfect granular configuration might look like :

```lua
    ["core.concealer"] = {
      config = {
        icons = {
          code_block = {
            conceal_header = true, -- Hide @code and @end code markers
            conceal_language_name = true, -- Hide language name ex : python
            conceal_language_icon = false, -- Hide language icon
            language_icon_position = left, -- "left", "right"
            icon_prefixe = "", -- anything to prefix the icon of language like ">" or any nerdfont like \uf121, manifesting the code block itself
          },
        },
      },
    },

Help

No

Implementation help

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIssues related to feature proposals. Please attach a module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions