zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
51.03k stars 3.17k forks source link

Custom editor top and bottom padding #12269

Open Aaron-212 opened 6 months ago

Aaron-212 commented 6 months ago

Check for existing issues

Describe the feature

Feature from VSCode. Two options to add top and bottom padding around the editor.

{
    "editor.padding.top": 90,
    "editor.padding.bottom": 90,
}

Related to #4962, the bottom padding is only applicable when editor.scrollBeyondLastLine is set to false.

Also, I'd suggest using lines as unit instead of pixels.

If applicable, add mockups / screenshots to help present your vision of the feature

截屏2024-05-25 13 49 03
orballo commented 4 months ago

I’d like to add, regarding the paddings, that it would be nice to be able to define custom paddings for both the left and right sides. Currently, in the buffer, there is no padding after the last character. This is how it’s working now:

Screenshot 2024-07-28 at 18 30 05

Additionally, but this may need a dedicated issue, sometimes while typing, the text reaches the limit of the buffer viewport, and you end up typing blindly. Ideally, when you reach the end of the buffer viewport, it should automatically scroll horizontally to let you see what you are typing.