-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
No textDocument/references LSP message is sent to extensions when references-view.find is not used on an identifier #77617
Comments
@jrieken assigning to you since this is not under the LSP control. We only send a server request if the reference provider is called in the VS Code extension API. |
/duplicate of #20010 |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
Yeah, this won't be an issue any more after proper streaming is enabled, but I still think this is a VS Code bug with "references-view.find" -- it doesn't repro with Peek References, i.e. editor.action.referenceSearch.trigger. |
Disagree - I think its fair not to try search for references when the cursor is on whitespace. Anyways, while we are the land of hacks and workaround. Why aren't you using the |
Thanks a lot -- that fixed the issue. I thought I had already tried that and it didn't work, but I was mistaken. |
Is there a way to refresh with Peek (editor.action.referenceSearch.trigger) or should I file a feature request for that? When we do that without moving the cursor it causes the Peek UI to disappear if it's visible, so we can't reliably refresh it (and the position moves if the cursor has changed) -- our workaround is to disable the "preview" ability for Peek References. |
No and please don't invest energy in workarounds when #20010 is what you need. |
It looks like #20010 is closed. Is there another issue we should be tracking? |
We closed this last year as 'out-of-scope' because it was on our 6-12 months roadmap. The issue can be commented on, and if we agree that's what we need can be re-opened. |
Bug: Our C/C++ extension needs to do vscode.commands.executeCommand("references-view.find") in order to re-send reference results after we have already sent our "preview" references from the initial textDocument/references, but VS Code is early aborting the references-view.find if the cursor is not on an identifier (otherwise it works). This breaks out ability to stream/preview references results back to users, which is bad because the final result could take many minutes, but the preview results may be usable and sufficient.
However, I believe we can workaround this via repeatedly trying the command until the users move their cursor on an identifier and updating our progress message to tell users they need to move their cursor to an identifier get the final references results -- it's just a strange thing to have to inform users about.
UPDATE: I got it working – the experience seems acceptable – in the somewhat unusual case where the user moves their cursor to an invalid Find All References location (i.e. not an identifier) then the progress message appends “Move your cursor to any identifier to get results”.
The text was updated successfully, but these errors were encountered: