Skip to content
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

Implement referencesProvider #336

Closed
renkun-ken opened this issue Sep 16, 2020 · 1 comment · Fixed by #338
Closed

Implement referencesProvider #336

renkun-ken opened this issue Sep 16, 2020 · 1 comment · Fixed by #338

Comments

@renkun-ken
Copy link
Member

The references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.

The referencesProvider could be implemented to have the following behavior:

  1. If the workspace is an R package, then find references in all R documents; otherwise, find references in open documents.
  2. Get the token at the requested position.
  3. Use the approach of definition provider to find definition of the token.
  4. Find all symbols in the documents and go-to-definition of each symbol.
  5. All symbols that go to the same definition will be included as a reference of the original token.
@randy3k
Copy link
Member

randy3k commented Sep 16, 2020

It sounds a valid approach. :+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants