-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Wrong alignment in cheatsheet when using icons on mapping description #74
Comments
@kingavatar could you look into this? I tried using |
@siduck, we can resolve the issue with whitespace length by using |
Looks complex to me, your PRs are always welcome man! But if it's getting complex at your end then lemme know, I won't support icons in the cheatsteet |
As the nvim_buf_add_highlight and other functions use byte indexing instead of character indexing, I have fixed the whitespace length to not include the extra bytes of unicode and also for highlighting I had to get the correct byte index for both text and space lines of cheatsheet using builtin functions. Additional testing is required to see all cases are handled. I have checked for emojis and glyphs working as of now. fixes NvChad#74
I have pushed a PR for this issue. Additional testing is required to see if all cases are handled. |
@BrunoKrugel test! |
working! |
…et (#86) * fix(nvcheatsheet): fix unicode highlighting and spacing of nvcheatsheet As the nvim_buf_add_highlight and other functions use byte indexing instead of character indexing, I have fixed the whitespace length to not include the extra bytes of unicode and also for highlighting I had to get the correct byte index for both text and space lines of cheatsheet using builtin functions. Additional testing is required to see all cases are handled. I have checked for emojis and glyphs working as of now. fixes #74 * fix(nvcheatsheet): handle title highlights as well For Now this will handle spacing and highlights of title and space below as well. But emoji in title is bit tricky to solve for now emojis or glyphs in title should not be allowed. * fix(nvcheatsheet): fix heading nerd font as well I have fixed nerd font icon for heading title as well. I have tried to include emojis but yet they are causing the space highlighting to offset right side. So emoji support yet.
Example:
["<leader>gc"] = { "<cmd>Telescope git_commits<CR>", " git commits" },
The text was updated successfully, but these errors were encountered: