#Formatter adds spaces between const

1 messages · Page 1 of 1 (latest)

late oar
#
pub const version_major = 3

pub const version_minor = 3

pub const version_revision = 0

pub const dont_care = -1

Doing this causes the formatter to always add these spaces here. Is it possible to get it to not do that? I'm creating bindings for GLFW, and there's nearly a hundred #DEFINE in there. I've converted a lot of them into types, but there's a lot that make more sense as constants like this.

It ends up adding a huge amount of whitespace , and I'm also personally not very convinced that this is more readable.

Somewhat unrelated, but having

pub const version_revision = 0 // some comment
pub const dont_care = -1

will format to

pub const version_revision = 0

//s

pub const dont_care = -1

Which is definitely not desired, as the first one is a super common commenting style. Let me know if there's already an issue for something related to this

silver terrace
#

The formatter is not configurable, always whitespace between top-level declarations .

Dunno if there’s an issue for trailing comments like that but for public documentation you should use three slashes before a declaration