Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Questions about forthcoming gnatformat support in ALS #1216

Open
brownts opened this issue Oct 16, 2024 · 0 comments
Open

[Bug]: Questions about forthcoming gnatformat support in ALS #1216

brownts opened this issue Oct 16, 2024 · 0 comments
Assignees
Labels

Comments

@brownts
Copy link

brownts commented Oct 16, 2024

Environment

  • OS and Version: N/A
  • IDE Version: N/A
  • Ada & SPARK Extension Version: N/A

Bug Summary and Reproducer

I have a few questions in anticipation of the inclusion of gnatformat in the ALS:

When I look in settings.md, it says by default this option is enabled. I also noticed in package.json, that the default for VSCode seems to be "true", which matches the description in settings.md. However, when looking in lsp-ada_configurations.ads, it appears the default value in the Configuration type sets Use_Gnatformat to false. Is this a discrepancy or is Use_Gnatformat defaulted to true elsewhere?

Is the expectation that the editor will pull these settings from the project file in order to adjust the its internal indentation and continuation amounts? If so, is there a plan for ALS to support a command for extracting this information from the project file? Also, when useGnatFormat is false, would it also support extracting similar settings from the Pretty_Printer section?

It seems that the settings provided in Format are almost identical to the settings you'd find in .editorconfig. Was there a reason to add a Format section, rather than use an existing .editorconfig?

Configuration and Logs

N/A

Other VS Code Extensions

No response

Additional context

No response

@brownts brownts added the bug label Oct 16, 2024
@joaopsazevedo joaopsazevedo self-assigned this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants