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

Sort dependencies problems #1183

Open bracke opened 4 months ago

bracke commented 4 months ago

with dependencies like:

with Chapter_1;
with Chapter_3;
with Chapter_2;

Using the sort dependencies action (clicking on the lamp bulb icon) will sort them but also insert an extra empty line inbetween:

with Chapter_1;

with Chapter_2;

with Chapter_3;

With dependencies like:

with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;
with Ada.Command_Line;
with Ada.Calendar;
with Ada.Numerics.Elementary_Functions;
with Random_Booleans;

Using the sort dependencies action will sort them, but insert copies of each line that mentions more than one package:

with Ada.Calendar;
with Ada.Command_Line;
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;
with Ada.Numerics.Elementary_Functions;
with Ada.Integer_Text_IO, Ada.Text_IO, Ada.Float_Text_IO;

with Random_Booleans;

This is in VSCodium with Ada & Spark extension v24.0.4 on Tuxedo Linux. GNAT 10.5.0 gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Kind regards Bent Bracke