Remove too many folding regions notification (#163854)

* Remove too many folding regions notification

* remove duplicate folding limit item for JSON/JSONC

* polish

* fix test
This commit is contained in:
Martin Aeschlimann
2022-10-17 23:42:02 +02:00
committed by GitHub
parent fb5b553316
commit c83eff40dd
14 changed files with 239 additions and 85 deletions

View File

@@ -181,7 +181,7 @@ export function createLanguageStatusItem(documentSelector: string[], statusReque
async function updateLanguageStatus() {
const document = window.activeTextEditor?.document;
if (document && documentSelector.indexOf(document.languageId) !== -1) {
if (document) {
try {
statusItem.text = '$(loading~spin)';
statusItem.detail = localize('pending.detail', 'Loading JSON info');
@@ -205,12 +205,12 @@ export function createLanguageStatusItem(documentSelector: string[], statusReque
arguments: [{ schemas, uri: document.uri.toString() } as ShowSchemasInput]
};
} catch (e) {
statusItem.text = localize('status.error', 'Unable to compute used schemas');
statusItem.text = localize('status.error1', 'Unable to compute used schemas: {0}', e.message);
statusItem.detail = undefined;
statusItem.command = undefined;
}
} else {
statusItem.text = localize('status.notJSON', 'Not a JSON editor');
statusItem.text = localize('status.error2', 'Unable to compute used schemas: No document');
statusItem.detail = undefined;
statusItem.command = undefined;
}