akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.36k stars 59 forks source link

[Feat request] Support line padding without messing up glyphs #442

Closed pro-anon closed 1 year ago

pro-anon commented 1 year ago

This is how kitty looks like with modify_font cell_height 200% image

This is how goneovim looks like after setting linespace=20 image

bfulop commented 1 year ago

In my understanding, this is a feature unique to Kitty. It will scale up certain glyphs (e.g. vertical separator line) to be 100% "line height".

pro-anon commented 1 year ago

I think so yeah. This is how VS Code looks like if you set the "editor.lineHeight" to 38 to add some padding.

image

I don't think it stretches out the unicode symbols? But it's not a terminal app so maybe they have more flexibility in their rendering so that they can increase the line padding without affecting the text inside each line.

A workaround that I've found is using vim.g.goneovim flag to change my separator glyph. But stuff like the telescope menu look a bit weird.

image

akiyosi commented 1 year ago

Hi, Thanks for this issue report :) I believe it is possible to scale specifically for some glyphs in goneovim as well. I will try it.

akiyosi commented 1 year ago

https://github.com/akiyosi/goneovim/actions/runs/4392964666

I have implemented this feature as a trial, please try it out. Any feedback would be appreciated.

bfulop commented 1 year ago

Thank you @akiyosi for working on this!

I always wished to have this feature exist in Goneovim!

The glyph vertical scaling is already looking great in the test build. 🎉

There are a few issues I noticed:

  1. the biggest issue is that the letter a is replaced by some different font (I'm using Iosevka Term font)
CleanShot 2023-03-12 at 10 50 40@2x
  1. There's some gap in the left pointing triangle:

CleanShot 2023-03-12 at 10 51 56@2x

  1. The border edges don't align (e.g. in telescope):

CleanShot 2023-03-12 at 10 51 24@2x

Thanks again for working on this! ❤️

pro-anon commented 1 year ago

Same issues as @bfulop image image With a different font: image

akiyosi commented 1 year ago

@pro-anon @bfulop

I have updated this feature.

https://github.com/akiyosi/goneovim/actions/runs/4397528120

The "a" character was being scaled because the "a" character was also scaled in the implementation for testing purposes. In this new feature, the character to be scaled can be set in the configuration file settings.toml. The default setting is as follows

2023-03-13 22 56 12
bfulop commented 1 year ago

Thank you so much, that was fast! It's looking great on my machine!

I can now remove the DrawWindowSeparator option from config. 🎉 The only reason I had it on was to have the continous separator line between splits.

pro-anon commented 1 year ago

Works perfectly!

bfulop commented 1 year ago

Hello @akiyosi ,

I was wondering if this feature could be included in the nightly releases?

I tested previous nightlies and did not see this applied. I just tried testing it again with the currently latest nightly but this release does not open on my Mac.

akiyosi commented 1 year ago

@bfulop This has not yet been merged. This change may have a slight performance impact and I am reviewing it closely.

akiyosi commented 1 year ago

merged.