roslynpad / roslynpad

A cross-platform C# editor based on Roslyn and AvalonEdit
https://roslynpad.net
MIT License
2.43k stars 341 forks source link

Support highlight same variables,goto definition,goto implimentation #524

Open infchaos opened 6 months ago

infchaos commented 6 months ago

Is there any way to support those features by roslyn? Ideas or api recommendations about these feature's implementation are welcome and helpful. I try to get ideas from rename command and found it's a service provided directly by roslyn and it's implementation is non public and very complex to understand.

highlight same variables means when cursor falling onto a variable,all the same variable references are highlighted. I am trying to implement these features by roslyn's symbolfinder functions but it always return empty results which makes me confusing.

aelij commented 6 months ago

Of course these are internal types but inside RoslynPad they are made public using IgnoresAccessChecksToGenerator.