Skip to content

support DocumentSelector to limit when extensions' providers are run

Administrator requested to merge ext-documentselector into master

Created by: sqs

The sourcegraph.languages.registerXyzProvider APIs have a selector parameter that defines the documents that the provider applies to. For example, registerHoverProvider(['python'], ...) means that the hover provider will only be called for Python files (.py, etc.).

Previously, the selector was not actually implemented, so the provider would be called on all files. This PR implements the selector, so the provider is only called on matching files.

(Also includes other refactor commits.)

Merge request reports

Loading