-
Notifications
You must be signed in to change notification settings - Fork 212
Description
With the LSP editor when Go To Def is handled, we try to use naming conventions to find component files, parse C# syntax to find component attributes, and/or do complex source mapping to pretend that component attributes are actually C# so that Roslyn can handle the request, and get better results.
With #12102 we introduced GTD support for Mvc tag helpers in cohosting, because we have access to the Roslyn compilation, and so can use C# semantic information to support more scenarios.
We can take this even further by removing the convention based system entirely, and using semantics for components and component attributes too. If we tweak the tag helper work to ask Roslyn to navigate to an ISymbol
directly, using a new API, then we can remove all of the odd source mapping and just navigate to anything we can get semantics for. Additionally, we'd get the benefit of Roslyn navigation features like Source Link, honouring span mapping (which would call back to us) without need to directly do it, etc.
We could further extend that to Hover, FAR etc. Any feature where we have a "tag helper" (Mvc or component) we could potentially talk symbols to Roslyn, simplifying our side while giving the user better results.
c/f #12102 (comment)