microsoft / microsoft/vscode-cpptools

Some providers should be deregistered/re-registered when the related feature is disabled/enabled

Offen
#11,229 1 Kommentar 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@browntarik arbeitet bereits daran.

Seit 18.8.2023.

Language Service
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Right now, we're always registering our providers in client.ts, even if the associated feature is disabled by settings.

If multiple providers are registered, depending on the feature, VS Code may invoke multiple and merge their results. So, in most cases, having our provider registered will not interfere with other extensions providing the same feature. But enabling/disabling of the feature's UI entry-point can be an issue.

For example, if C_Cpp.formatting is set to disabled, we should deregister our provider(s). Otherwise, if the user right-clicks on the document, they are still provided with options to format the document, despite those commands being effectively disabled. Unregistering the provider(s) should cause the option to not be offered.

The repro I encountered is related to the formatting provider(s), but we should check if the same scenario can arise for other providers.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.