-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Labels
Description
Environment
- OS and Version: Windows 11
- IDE Version: VS Code 1.106.3
- Ada & SPARK Extension Version: 2026.0.202510141
Bug Summary and Reproducer
Bug Summary: Gnatformat engine always used even if useGnatformat is false
Steps to reproduce:
- Set formatter as legacy gnatpp engine (with .als.json or in the workspace setting file)
- Set a different indentation parameter in package Pretty_Printer and Format (ex : indentation = 3 vs. 2)
- Trigger format document
Expected behavior:
Ada source code should be reformatted using Pretty_Printer indentation value
But Ada source code is reformatted using Print indentation value
NB : Behavior is different - and correct - if previous version 26.0.202507021 is installed
.als.json
{
"projectFile": "hello.gpr",
"scenarioVariables": {},
"onTypeFormatting": {
"indentOnly": true
},
"useGnatformat": false
}
hello.gpr
-- TOP OF FILE
project Hello is
for Object_Dir use "obj";
for Main use ("hello.adb");
package Compiler is
for Default_Switches ("Ada") use ("-g");
end Compiler;
package Pretty_Printer is
for Default_Switches ("ada") use
(
"--name-mixed-case",
"--no-end-id",
"--source-line-breaks",
"--indentation=3"
);
end Pretty_Printer;
package Format is
for Indentation ("Ada") use "2";
end Format;
end Hello;
Configuration and Logs
no compiler installed
tasks.json emptyOther VS Code Extensions
None
Additional context
None