AdaCore / AdaCore/ada_language_server

[Bug]: Questions about forthcoming gnatformat support in ALS

Open
#1,216 3 comments 0 reactions 1 assignee View on GitHub

@joaopsazevedo is already working on this.

Since Oct 16, 2024.

bug
Dominant language
Ada
Stars
304
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.