generalize limit indicator and use for color decorators (#173730)

* generalize limit indicator and use for color decorators

* remove updateDebounceInfo max
This commit is contained in:
Martin Aeschlimann
2023-02-08 07:43:29 +01:00
committed by GitHub
parent cb671d149a
commit 911f119120
15 changed files with 283 additions and 153 deletions

View File

@@ -272,19 +272,10 @@ export function createDocumentSymbolsLimitItem(documentSelector: string[], setti
const statusItem = languages.createLanguageStatusItem('json.documentSymbolsStatus', documentSelector);
statusItem.name = l10n.t('JSON Outline Status');
statusItem.severity = LanguageStatusSeverity.Warning;
statusItem.text = l10n.t('Outline Limited');
statusItem.detail = l10n.t('only {0} document symbols shown', limit);
statusItem.text = l10n.t('Outline');
statusItem.detail = l10n.t('only {0} document symbols shown for performance reasons', limit);
statusItem.command = { command: openSettingsCommand, arguments: [settingId], title: configureSettingsLabel };
return Disposable.from(statusItem);
}
export function createDocumentColorsLimitItem(documentSelector: string[], settingId: string, limit: number): Disposable {
const statusItem = languages.createLanguageStatusItem('json.documentColorsStatus', documentSelector);
statusItem.name = l10n.t('JSON Color Symbol Status');
statusItem.severity = LanguageStatusSeverity.Warning;
statusItem.text = l10n.t('Color Symbols Limited');
statusItem.detail = l10n.t('only {0} color decorators shown', limit);
statusItem.command = { command: openSettingsCommand, arguments: [settingId], title: configureSettingsLabel };
return Disposable.from(statusItem);
}