(file)
| 1452 | } |
| 1453 | |
| 1454 | function showLoadingEditor(file) { |
| 1455 | const loadingState = EditorState.create({ |
| 1456 | doc: "", |
| 1457 | extensions: [ |
| 1458 | themeCompartment.of(getConfiguredThemeExtension()), |
| 1459 | ...getBaseExtensionsFromOptions(), |
| 1460 | languageCompartment.of([]), |
| 1461 | lspCompartment.of([]), |
| 1462 | readOnlyCompartment.of(EditorState.readOnly.of(true)), |
| 1463 | EditorView.editable.of(false), |
| 1464 | placeholder(`Loading ${file.filename || "file"}...`), |
| 1465 | ], |
| 1466 | }); |
| 1467 | editor.setState(loadingState); |
| 1468 | touchSelectionController?.onSessionChanged(); |
| 1469 | } |
| 1470 | |
| 1471 | // Helper: apply a file's content and language to the editor view |
| 1472 | function applyFileToEditor(file, options = {}) { |
no test coverage detected