Skip to content
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

help: anyway to put an icon on the end of headings? #238

Closed
Giessen opened this issue Nov 22, 2024 · 3 comments
Closed

help: anyway to put an icon on the end of headings? #238

Giessen opened this issue Nov 22, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Giessen
Copy link

Giessen commented Nov 22, 2024

Neovim version (nvim -v)

0.11.0-dev-3c803483a

Neovim distribution

lunarvim

Description

anyway to put an icon on the end of headings? Thanks for any instruction.

@Giessen Giessen added the question Further information is requested label Nov 22, 2024
@MeanderingProgrammer
Copy link
Owner

There is not a way to put icons at the end. Will give the feature some thought.

MeanderingProgrammer added a commit that referenced this issue Nov 23, 2024
## Details

Request: #238

Adds a new option for `heading.position` for value `right`.

When set icons will be added to the end of the heading line rather than
at the beginning. This will also conceal the atx heading `#` values.
To make this easier internally the query for headings has changed from
getting markers, i.e. atx_h1_marker, to instead grab the entire heading
line, i.e. atx_heading. From there we do some processing on the node to
get different parts like the marker. Needed to make some minor
adjustments to ranges as part of this change.

Inline icons for headings now remove the space between the marker and
the heading title, using the space of the icon itself rather than doing
the double spaced thing. Users can add an additional space to the icons
in the configuration to get back the old behavior.

Added an offset to the list module `add_over` method to allow the
starts / ends to by slightly modified but still to be based off of a
specific node. Used this in a few other places where applicable.

Added more unit tests for different heading configuration behaviors.
@MeanderingProgrammer
Copy link
Owner

Added this here: e1879e0

You can set it with:

require('render-markdown').setup({
    heading = { position = 'right' },
})

@Giessen
Copy link
Author

Giessen commented Dec 7, 2024

Thank you very much. Is it possible to allow ending icon in overlay mode (showing in the image) ? I find the indentation is good for navigation.
1733589445997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants