Closed Subjective closed 6 months ago
I've also noticed that the file_modified
option is no longer configured by default. IMO it would make sense to have it set alongside file_read_only
, and then just have the default config for heirline in https://github.com/AstroNvim/AstroNvim/blob/9054fa4c767f0327340d82411d4e7f10307d9aca/lua/astronvim/plugins/heirline.lua#L54-L69 set file_modified = false
since the user won't have to remember this exact padding information if they want to include this option in a custom statusline:
opts = extend_tbl({
file_icon = { hl = hl.file_icon "statusline", padding = { left = 1, right = 1 }, condition = condition.is_file },
filename = false,
filetype = {},
file_modified = { padding = { left = 1 }, condition = condition.is_file },
file_read_only = { padding = { left = 1 }, condition = condition.is_file },
surround = { separator = "left", color = "file_info_bg", condition = condition.has_filetype },
hl = hl.get_attributes "file_info",
}, opts)
I probably should've clarified better, but my main concern was with the inconsistent padding (the right padding added to file_modified
and file_read_only
in v4).
For example, in v3, the default statusline had exactly 3 spaces of padding between separate components:
However, with the new additional right padding, there are 4 spaces after the file_info
component when the file_modified
icon is shown.
Similarly, the tabline now has double spacing between the file_modified
and file_read_only
icon:
Ah, I see what you mean. I will go ahead and merge this and then revise the commit to fix some things. Thanks for the clarification!
📑 Description
From v3 to v4, I've noticed that an extra right padding was added to the
file_read_only
andfile_modified
components. While minor, this adds double spacing between the two when a file has both been modified and is read only, which feels a bit inconsistent.ℹ Additional Information
Before:
After: