zed icon indicating copy to clipboard operation
zed copied to clipboard

Add settings to reduce left padding of line numbers

Open dtonda8 opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the feature

Looks like there is some free real estate on the left of the numbers. I think it'd look neater if line numbers were more centered/reducing left padding.

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

image

Relevant settings for the above:

{
  "gutter": {
    "folds": false,
    "line_numbers": false,
    "code_actions": false,
    "runnables": true
  }
}

Sublime for reference: image

dtonda8 avatar Jul 16 '24 07:07 dtonda8

Any progress here?

m0rg5 avatar Jan 17 '25 02:01 m0rg5

The space outside the gutter is partly due to how the UI is designed. As shown in the image below, there is a relatively large space around the editor box, even in Zen mode. It would be helpful to have a setting to control the padding around the editor.

Image

snnsnn avatar May 25 '25 21:05 snnsnn

There is one more setting in the gutter group which is not mention in the issue : "breakpoints": false

Here is the complete list to turn them off all at once, although it does not remove the padding completely:

  "gutter": {
    "breakpoints": false,
    "code_actions": false,
    "folds": false,
    "line_numbers": false,
    "runnables": false
  },

snnsnn avatar May 25 '25 21:05 snnsnn

https://github.com/zed-industries/zed/blob/0ac17526687bf11007f0fbb5c3b2ff463ce47293/assets/settings/default.json#L502-L513

Now, there's a min_line_number_digits entry that will start showing the gutter as small as given in this setting, and expands when scrolled to a longer digit sequence.

SomeoneToIgnore avatar Sep 09 '25 15:09 SomeoneToIgnore