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

Enable customization of the undercurl #764

Closed
Shatur opened this issue Jun 27, 2021 · 7 comments · Fixed by #1469
Closed

Enable customization of the undercurl #764

Shatur opened this issue Jun 27, 2021 · 7 comments · Fixed by #1469
Labels
enhancement New feature or request

Comments

@Shatur
Copy link

Shatur commented Jun 27, 2021

Describe the bug

Undercurl looks like a dotted line:

изображение

To Reproduce
Steps to reproduce the behavior:

  1. hi SpellBad gui=undercurl guisp=Red
  2. hi SpellBad

Expected behavior
изображение

Current behavior
изображение

Desktop (please complete the following information):

  • OS: Linux
  • Neovide Version: 82b745c (latest commit at the time of writing)
  • Neovim Version: bdf3df4027a5389a46b4c9a75b50aff5c0ecb351 (latest commit at the time of writing)

Please run neovide --log and paste the contents of the .log file here:

neovide_rCURRENT.log

@Shatur Shatur added the bug Something isn't working label Jun 27, 2021
@Kethku
Copy link
Member

Kethku commented Jun 27, 2021

I would argue this is a nitpick rather than a bug. Is there a big benefit to doing undercurls as a wavy line? The dashed line was done just because its the simplest to implement, but in using it I've actually grown to like it.

Maybe a better request here is to give a way to customize the underline graphic. Maybe underline, dashed, wave, other??

@Shatur
Copy link
Author

Shatur commented Jun 27, 2021

Maybe a better request here is to give a way to customize the underline graphic. Maybe underline, dashed, wave, other??

I would render this as undercurl. This is how it implemented in all editors (not even just all Neovim clients). I even thought that this is a bug :)

@Kethku
Copy link
Member

Kethku commented Jun 27, 2021

Note: this isn't strictly true. There are some neovim guis which render it as an underline.

I think I'm gonna swap this to an enhancement and label it "add customization of undercurl rendering". But honestly there are some bigger fish to fry atm. I will get back to this, but it may be a bit

@Kethku Kethku added enhancement New feature or request and removed bug Something isn't working labels Jun 27, 2021
@Kethku Kethku changed the title Undercurl rendered incorrectly Enable customization of the undercurl Jun 27, 2021
@Shatur
Copy link
Author

Shatur commented Jun 27, 2021

Note: this isn't strictly true. There are some neovim guis which render it as an underline.

Did not know.
I used Neovim Qt, Gonvim, firenvim and oni2 - all of them renders undercurl as undercurl (expected). Also GVim behaves the same.

I think I'm gonna swap this to an enhancement and label it "add customization of undercurl rendering". But honestly there are some bigger fish to fry atm. I will get back to this, but it may be a bit

You may find this PR useful for the algorithm of the implementation: equalsraf/neovim-qt#803

@clason
Copy link
Collaborator

clason commented Jun 28, 2021

Are you sure that this is not in fact an undercurl that is just clipped to much (so it cuts off the lower part of the curl, leaving a dotted line)?

I've noticed a similar off-center cut-off where the top of lines is cropped too much (most visible in floats):
Screenshot 2021-06-28 at 10 19 40
(Note how the top of the parentheses touches the float boundary, while there is ample space at the bottom.)

@calops
Copy link
Contributor

calops commented Aug 6, 2022

I would argue this is a nitpick rather than a bug. Is there a big benefit to doing undercurls as a wavy line?

I don't know if it was like that at the time of this question, but there's a very simple reason now: neovim supports multiple "underlining" styles, including undercurl, underdotted and underdashed. It seems pretty straightforward to me that these should all be supported (and look different by default) by neovide.

@calops
Copy link
Contributor

calops commented Aug 8, 2022

I'll add another point: currently in neovide, undercurl is "supported" (as a weird, uneven dashed line), while underdotted and underdashed aren't (nothing is displayed).

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

Successfully merging a pull request may close this issue.

4 participants