AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

Add Subprogram Box command only applies to package body #1156

Closed rocher closed 11 months ago

rocher commented 11 months ago

There are two cases:

  1. When editing any subprogram of a package body, the add subprogram box command is applied only to the package, not to the subprogram.
  2. When editing a single procedure in a *.adb file, the add subprogram box command does nothing, possibly because no package is found (?).

I checked if a setup parameter could change this behavior, but none found. Is there a new key-combination to apply this command to subprograms instead of packages? Is this a bug?

In my opinion, it should apply to subprograms (even inside a another subprogram) or task bodies first, then to package when cursor is outside subprogram/task but inside a package.

AnthonyLeonardoGracio commented 11 months ago

Hello @rocher,

Indeed, we have a fix for that. We introduced a very pernicious bug due to a refactoring. The command will work again in the next extension release.

Sorry for the inconvenience.

Regards,

reznikmm commented 11 months ago

:wrench: Should work again in 23.0.21!

rocher commented 11 months ago

Now it works great!! Thanks!!