Skip to content

allow contributing actions to location results

Warren Gifford requested to merge imprecise-refs into master

Created by: sqs

This lets extensions' location providers (definition/reference/etc. providers) associate context data with each location, and also contribute actions that are shown selectively in the file title for location matches shown in the panel.

Together, these new features allow the basic-code-intel extension to add "Fuzzy" badges to defs/refs in the panel. This fixes https://github.com/sourcegraph/sourcegraph/issues/1174.

It would also enable things like:

  • Showing a "source" badge on cross-repository reference results explaining how the reference was found (eg by looking up dependents on npm)
  • Showing the type of reference (eg denoting some references as "Assignments", some as "Calls", some as "References", etc.)
  • Adding an action to "hide" or "always ignore" the reference
  • Adding an action to add the match to a saved list
  • Adding an action for users to say "This was useful" or "This was not useful" (eg for a code examples extension)

See https://github.com/sourcegraph/sourcegraph-basic-code-intel/pull/10 for an example of how extensions can use this new API.

Screenshot (note the Fuzzy badge in the panel)

screenshot from 2019-01-03 23-03-24

Merge request reports

Loading