The Issue
Ada Language Server (ALS) claims to use gnatformat for formatting (ada.useGnatformat = true), but record layouts differ from standalone gnatformat even so the same .gpr is used:
ALS output:
for field use
record
A at 0 range 0 .. 0;
ABC at 0 range 1 .. 1;
end record;
gnatformat CLI:
for field use
record
A at 0 range 0 .. 0;
ABC at 0 range 1 .. 1;
end record;
In https://www.adacore.com/devlog its mentioned:
GNATformat now aligns the ‘at’ and ‘range’ keywords on consecutive record representation clauses.
Does somebody know how to achieve the same output with gnatformat as CLI and why the results differ?