Skip to content

feature: Provision to render something like indent lines when indentation is enabled between headers #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Nishanth-2024 opened this issue Feb 22, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@Nishanth-2024
Copy link

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

This is not related to any problem but I would like to describe as just a nice to have optional feature.
This will

Describe the solution you'd like

Here is my current related setup

require 'render-markdown'.setup {
  indent = {
    enabled = true,
    per_level = 4,
  },

  -- additional configs ...
}

I have created a test markdown file and here is the screenshot of it and after editing it for suggestion

Image

Image

Describe alternatives you've considered

N/A. I would like to look for alternatives but can not even comprehend where to look for.

Additional information

No response

@Nishanth-2024 Nishanth-2024 added the enhancement New feature or request label Feb 22, 2025
@MeanderingProgrammer
Copy link
Owner

Hi, I don't quite understand the feature request.

Are you saying the second picture is how you want it to look? Or is that how it looks when you have you have indent-blankline.nvim enabled? Mine does not end up looking like that so maybe I'll need your configuration for that as well.

I'm confused about what after editing it for suggestion means. Did you use photo editing software, enable some other plugin, insert some additional text?

@Nishanth-2024
Copy link
Author

I would like it if it looks like second picture or something else altogether instead of rendering blank spaces. And if it could be optional even better seeing there are is no such request from any other user for such a widely used and revered plugin

MeanderingProgrammer added a commit that referenced this issue Feb 25, 2025
## Details

Request: #343

Adds `icon` & `highlight` values to `indent` configuration. By default
the `icon` is set to the empty string resulting in no change.

However when an `icon` is provided, for example:

```lua
require('render-markdown').setup({
    indent = {
        enabled = true,
        per_level = 4,
        icon = '▎',
    },
})
```

We end up with behavior similar to `indent-blankline.nvim`, where each
set of 4 spaces starts with the configured icon, giving a quick visual
of how far indented the current section is. The icon is not limited to
one character, but users will likely choose one that is, otherwise
things get cluttered rather quickly.
@MeanderingProgrammer
Copy link
Owner

Gotcha, added this functionality here: 21623a9

For now it's an opt-in feature which you can enable by setting an indent icon value. I do like the way it looks so I may add a default value for it in the future and make it opt-out instead. Give this a shot and LMK what you think:

require 'render-markdown'.setup {
  indent = {
    enabled = true,
    per_level = 4,
    icon = '',
  },
}

Thanks for the suggestion!

@Nishanth-2024
Copy link
Author

Nishanth-2024 commented Feb 25, 2025

Thank you. That's awesome. This is better than what I was hoping it would turn out to be

Image

Image

@MeanderingProgrammer
Copy link
Owner

I agree, I like the way this one turned out quite a bit :)

I decided to add an icon by default and make it opt-out instead of opt-in here: 33673e6

So if you're using the same icon value you can update and remove that part from your config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants