Skip to content

Custom head1 emoji can't attach a empty space #35

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
xixiaofinland opened this issue Jun 8, 2024 · 4 comments
Closed

Custom head1 emoji can't attach a empty space #35

xixiaofinland opened this issue Jun 8, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@xixiaofinland
Copy link

xixiaofinland commented Jun 8, 2024

When customizing heads' and bulletpoints' emoji icons, H1 and bullet points can't use "a space" after the icon, like my current config here

Taking H1 as an example, if I add the space after the icon (i.e. '🐹 ' rather than '🐹'), the first char ('f') after the H1 is overlapped (screenshot below)
Image 007

Here is the text version
Image 008

This issue doesn't apply to H2, H3....

@MeanderingProgrammer
Copy link
Owner

MeanderingProgrammer commented Jun 8, 2024

Yeah, this is due to the number of characters we have on an h1. Since it's only the single # and the space, there are only 2 characters available to us before we start overwriting the title. Some more details on it here: #12 (comment).

I've added this as a known limitation for the time being. I'm not sure if I want to fix this, messing with text positioning is not something I want this plugin to do in general. Ideally it is just an overlay over top of the raw text rather than something that does a lot of displacing.

@xixiaofinland
Copy link
Author

I see, thanks for the explanation. I agree it's better to keep it simple and not mess up with the original text.

@MeanderingProgrammer
Copy link
Owner

I did push a fix for this here 5ce3566, if you want to try using longer icons / text and are using neovim >= 0.10.0.

@xixiaofinland
Copy link
Author

Thanks for notifying! I will give it a try

@MeanderingProgrammer MeanderingProgrammer added the enhancement New feature or request label Feb 7, 2025
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