microsoft / microsoft/vscode-cpptools

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

Aperta
#11,229 1 commento 1 reazione 1 assegnatario Vedi su GitHub

@browntarik ci sta già lavorando.

Dal 18/8/2023.

Language Service
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.