-
Notifications
You must be signed in to change notification settings - Fork 646
Feature request: always display references #726
Comments
++ this is like a must have time saver to me. |
This would be really awesome. Codelens is also now available for Typescript https://code.visualstudio.com/updates/v1_9#_typescript-references-codelens It's has been a very useful feature for me in C# in VS |
Yes, it is a very good feature indeed. PRs are welcome. |
I've build a go codelens prototype. It shows references for functions, interfaces and structs. It takes some time to find all references, but i don't think there is much i can do about it. https://github.com/thesoenke/vscode-go/tree/codelens One issue i ran into is that go-outline seems to return always 1 as the start character instead as of at least 6 for functions in a line, but for structs it's correct. Another issue is that the console is filled with errors from guru when editing the code. Not sure what's the best solution here |
@theSoenke great work! Please send a PR and we can try and get this in the next release :) Few points
|
About the errors in the console on edit, I see 2 types
The second one is because you are returning the codelens promises even the ones that do not return a codelens. So something like this
instead of |
@theSoenke Found the issue. Both |
@theSoenke Alright, I have updated both Merge from master, and things should work well now. |
Great! Thanks for looking so quick into this and provide the fixes 👋 Unfortunately the debug console still contains errors from guru when syntax is not valid and the file not saved. |
Oh that! That is the call to references being cancelled. Change the |
This feature is now available in the latest update (0.6.60). Thanks @theSoenke! |
Happy to contribute a little bit to this great extension :) |
This is probably a hard one but something that is super useful when writing C# in Visual Studio
The feature is defined here: https://code.visualstudio.com/docs/editor/editingevolved#_reference-information
VSCode supports this feature when asking for references of a specific value, but the data isn't cached and it isn't always displayed as in the image above.
https://code.visualstudio.com/Docs/extensionAPI/vscode-api#_a-namecodelensaspan-classcodeitem-id471codelensspan
The text was updated successfully, but these errors were encountered: