-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find all references (Experimental Version) #15
Comments
Continuing #404 discussion, couldn't something be achieved with cscope (which seems to be the ctags equivalent for references /call hierarchy)? I like the current lightweight ctags-based approach, as real "intellisense" is often hard to make work on projects using custom build systems, less error-resilient, and slower especially on network filesystems. |
We don't use cscope or ctags and are not planning to. We expect the IntelliSense implementation to work. |
I was also surprised this feature was not available while trying VSCode again starting today, for the 3rd time in the last 3 years... Given this issue has been opened for over a year, is there a great deal of effort getting it done or is it motivation or priority related? Features like this shouldn't be kicked down the line and I believe the Go project for VSCode has the feature working. Given the length of time this has been opened I just want to make sure this is on developer's minds to get done, with that daily nagging feeling from knowing it's been on the todo list too long. 30 people have thumbs up'd, clearly this issue is important to users. |
@nevion We have recently started doing work that is expected to enable the Find All References feature, along with other VS 2017 C++ features that are not currently available, such as comments in hover and parameter help. We don't have an ETA. |
@sean-mcmanus 'comments in hover' refer to documentation about certain methods present inside comments or something else? If it's the former, will it be tied to certain style like doxygen or standardese? |
@agauniyal It refers to showing the comments next to the definition/declaration of code, similar to what VS 2017 (you can try that to see how we expect it to behave). The internal style of the comments won't matter and we'd just show it as a comment. |
Really looking forward to this feature. Is there any sort of ETA? |
@BryanDiLaura There is no ETA for Find All References. Finding references that occur in different translation units requires additional infrastructure/porting work. Once we have an ETA, we'll post it in a milestone: https://github.com/Microsoft/vscode-cpptools/milestones . |
While it's not as awesome as intellisense based symbols/tags, vscode-ag (silver searcher) is pretty fast to do searches. Although I wish it was more configurable, such as only searching cpp/c/h files like the command line version. Currently it searches everything in the folder. It might be an acceptable work around until the intellisense feature is available. |
BTW there is very powerful C++ extension cquery (https://marketplace.visualstudio.com/items?itemName=cquery-project.cquery) It is blazingly fast, has all IDE features, including this one. I guess it's more reasonable to make this extension an official C++ one |
What do you mean by official? |
Default suggested one with green star label |
I'm very interested in this feature. |
RE: cquery It would be nice if |
@xgalaxy Setting the intelliSenseEngine to "Tag Parser" and the browse.path to [] should eliminate most indexing of symbols. Is there a reason that is not sufficient? That would only be a per-project fix, but when we expose a global setting for this, then you could set the global setting to be blank as well. We also have issue #785 tracking this. |
Yes, I switched to cquery too for its find all references, renaming etc. However even with Tag-Parser only you will get duplicate hover-tooltips for all local types. Also I did not find a way to suppress the warning squiggles that the parser could not find the header files. |
@decimad Yeah, the include path warning isn't currently disable-able, which would be fixed by #785 . Duplicate items with tag parser is "by design" -- if cquery has hover support, you can clear the browse.path to reduce the amount of symbols, although we still parse symbols on open file, so there might be some symbols found anyway. Our typescript is open source, so I believe it would be relatively easy to add a disable setting -- there's a comment in #785 that suggests one way to disable the extension via modifying the javascript. |
Until this is ready, I have things working pretty well with the vscode-clangd extension and this extension both enabled. Here are the key things you need to add to your settings:
Also I then symlink It is a little flaky. Sometimes clangd seems to get stuck and I have to reload the window. Also while error squiggles, Find All Reference, and Go To Definition work pretty reliably, Find Symbol doesn't. Still I think it is the best option until this extension supports it properly. |
To add to what @Timmmm said, note that |
Is this implementation going to work without requiring installation of external tools? It's hard for me to get tools, and Eclipse CDT provides this feature without them. |
:). Yes, indexing has been a core feature of CDT since the beginning. It's hard to do right enough and fast enough so I appreciate the time cpptools is taking to get there. |
@HunterZ No external tools will be required. |
is it usable or not now? |
@pig-peppa We're currently doing functionality and performance testing -- we might be able to release an Insider vsix next week or so. |
up |
For those following this eagerly like me, this is the pull request: #4016. It is only the VSCode configuration part of the change though. I think the meat of the work is in the closed-source intellisense engine, so I don't think we can try it out yet. Getting closer though! |
fixed?when will be released?Can't wait for it!Thanks~ |
Great! Let's celebrate! |
Find All References (and Peek References) is available via setting C_Cpp.updateChannel to "Insiders" (or manually install it from https://github.com/microsoft/vscode-cpptools/releases/tag/0.25.0-insiders ), and then setting the C_Cpp.experimentalFeatures setting to "Enabled" -- we hid the feature behind this setting so that we could get feedback on the feature from a smaller audience. A bunch of "known issues" with the feature can be found at
Feature: Find All References
|
nice.. |
We shipped Find All References (Experimental Version) with 0.25.0. A list of known enhancements/bugs can be found at
Feature: Find All References
UPDATE: I renamed the issue with "Experimental Version" to try to prevent people from thinking we're 100% done with the feature (since this issue is "closed"), aka "Version 1". |
Still not working. VScode finds for example |
@Konstantin6487 what are you looking for? |
I'm sorry. I made a mistake. My problem is only with js. |
Hi all, You guys did something to C_Cpp.PeekDeclaration command? After updating the extension error appears: |
@XobSod Yeah, it's removed -- we use the built-in Peek Declaration command now. |
Would be great to have Find all references working. Huge helper in large projects.
The text was updated successfully, but these errors were encountered: