-
-
Notifications
You must be signed in to change notification settings - Fork 168
Description
Hi, so after investigating, i've found that current dashboard alignment has a hardcoded horizontal offset of -6, which causes the content to be slightly misaligned to the left on default or fresh NvChad installations.
After testing, I found that changing this offset from -6 to -2 results in much more accurate centering. This value seems to better reflect the default width of UI elements.
I made a fresh install. Defaults are here .local/share/nvim/lazy/ui/lua/nvchad/nvdash/init.lua:
local col = math.floor((winw / 2) - math.floor(strw(v) / 2)) - 6
col = math.floor((winw / 2) - math.floor(w / 2)) - 6
col = math.floor((winw / 2) - math.floor(w / 2)) - 6Changed -6 to -2 in .local/share/nvim/lazy/ui/lua/nvchad/nvdash/init.lua:
local col = math.floor((winw / 2) - math.floor(strw(v) / 2)) - 2
col = math.floor((winw / 2) - math.floor(w / 2)) - 2
col = math.floor((winw / 2) - math.floor(w / 2)) - 2While I understand that there can be a specific reasoning: taking into account a number column and a sign column. But default installation looks much better with the defaults changed to -2.
What do you think? Can we change it to -2 by default? Or maybe make this offset a configurable option?
Thanks.
P.S. I didn't make a PR because I'm not sure whether there might be any other reasoning behind this -6 value apart from what i've written above.

