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

Idea: suggestion for missing "with Ada.Strings.Fixed" and "Ada.Characters.Handling" #171

Open
zertovitch opened this issue Mar 20, 2024 · 1 comment
Assignees

Comments

@zertovitch
Copy link

When you write a "Put_Line" without a "with Ada.Text_IO;", GNAT suggests, and GNAT provides the "wrench" for it, to add "with Ada.Text_IO; use with Ada.Text_IO;". It is super useful.
In a similar way, I have more than often, since decades, the case where "To_Lower", "To_Upper" or "Trim" are not known to GNAT.
It would be extremely cool to have a similar suggestion with an auto-fix with
"with Ada.Characters.Handling; use Ada.Characters.Handling;"
and
"with Ada.Strings.Fixed; use Ada.Strings, Ada.Strings.Fixed;"
depending on those function names (and perhaps others).
Especially, "Ada.Characters.Handling" is not an obvious place to search for "To_Lower" and "To_Upper", so it would be welcoming for beginners.

@AnthonyLeonardoGracio
Copy link
Collaborator

Hello,

We are working on LSP codeActions in the Ada Language Server side for that. We will also provide a way to irectly import missing packages when using completion to import an invisible symbol: that would solve your issue.

Keeping you posted.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants