object88 / langd

A Language Server Protocol implementation in Go for Go
MIT License
7 stars 0 forks source link

Implement `LocateReferences` #35

Open object88 opened 6 years ago

object88 commented 6 years ago

Want to be able to find everywhere that a particular identifier is used. This should include in the current file, the package it's defined within, and if exported, other packages that import the package, or indirect imports or usages.

Note: we do not want a brute force scan of all packages in the workspace. For a significantly large workspace, this could be excessive if the package is defined at one end of the package DAG. Instead, find where the identifier is defined, and follow the package ascendents. Immediate ascendents will directly import the package, and further ascendents may indirectly import based on the packages that did directly import. If there is a more clever technique, it can be applied later.

object88 commented 6 years ago

Largely implemented in #37, still some missing parts.