Open Joebeazelman opened 1 year ago
I'm unable to reproduce this. Could you provide the complete code?
I have a similar problem with uses,
having defined and in the path of the gpr:
generic
V_DATA: STRING;
package Q_OTHER.Q_GENERIC is
procedure P_PROCEDURE (V_PARAM : T_TYPE);
...
Then having in file.ads sometihng like:
package Q_PACK_INSTANCE is new Q_OTHER.Q_GENERIC ("SOME_DATA");
and in the body of file.adb
use Q_PACK_INSTANCE ;
The calls to functions defined in Q_OTHER.Q_GENERIC are no longer colored nor is able to navigate to the definition of those.
procedure P_MYPROCEDURE is
begin
P_PROCEDURE (7); --No color and no navigation to the generic definition
end P_MYPROCEDURE;
We still need a complete reproducer. I've tried this one and it works as expected:
package Q_OTHER is
end Q_OTHER;
generic
V_DATA: STRING;
package Q_OTHER.Q_GENERIC is
procedure P_PROCEDURE (V_PARAM : Integer);
end Q_OTHER.Q_GENERIC;
with Q_OTHER.Q_GENERIC;
package Q_PACK_INSTANCE is new Q_OTHER.Q_GENERIC ("SOME_DATA");
with Q_PACK_INSTANCE;
procedure Main is
use Q_PACK_INSTANCE ;
begin
P_PROCEDURE (7); -- adsa11213
Main;
end Main;
In the code below, the third line uses an odd syntax, which although valid to the compiler and Ada Language Server, results in a partial loss of syntax coloring and code navigation options. When the line is commented out, the syntax coloring returns along with code navigation, except for the line directly under it.
procedure Main is ... use type USB.Device.Init_Result; -- lose syntax highlighting and other features Status : USB.Device.Init_Result; -- this line is partially highlighted when the line above is commented out begin
... end; end main;
package USB.Device is
type Init_Result is (Ok, Not_Enough_EPs, Not_Enough_EP_Buffer);
end USB.Device;