The problem is that your space grow really fast and that your compilers are really not built to extract that information in a few ms.
Even less to regenerate only part of it based on partial input. Even less when the input may not be correct syntax.
Also that linkage being kept is exactly what this post talk about. How to keep it intact through the different steps and transformations in your pipeline in a way adapted to the kind of queries you are going to need is... Actually hard and dependent on the query.
Which means that adding new features to your IDE would regularly need (and actually does need) a new way to store and query that data.
But yes. Reusing part of the rust compiler (or replacing some of them) in rust-analyzer is already something that happens and that maintainers work on.
It is just not that easy. But yes, C# and Roslyn in general was built with that in mind. Typescript too.
The problem is that your space grow really fast and that your compilers are really not built to extract that information in a few ms.
Even less to regenerate only part of it based on partial input. Even less when the input may not be correct syntax.
Also that linkage being kept is exactly what this post talk about. How to keep it intact through the different steps and transformations in your pipeline in a way adapted to the kind of queries you are going to need is... Actually hard and dependent on the query.
Which means that adding new features to your IDE would regularly need (and actually does need) a new way to store and query that data.
But yes. Reusing part of the rust compiler (or replacing some of them) in rust-analyzer is already something that happens and that maintainers work on.
It is just not that easy. But yes, C# and Roslyn in general was built with that in mind. Typescript too.