Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/cm/lsp/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ export default class AcodeWorkspace extends Workspace {
if (mode?.name) {
return String(mode.name).toLowerCase();
}
} catch (_) {}
} catch (error) {
console.warn(
`[LSP:Workspace] Failed to resolve language id for ${uri}`,
error,
);
}
return "plaintext";
}

Expand Down
15 changes: 12 additions & 3 deletions src/lib/editorFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,12 @@ export default class EditorFile {
EditorState.readOnly.of(!!value),
),
});
} catch (_) {}
} catch (error) {
console.warn(
`Failed to update read-only state for ${this.filename || this.uri}`,
error,
);
}

// Sync internal flags and header
this.readOnly = !!value;
Expand Down Expand Up @@ -1072,7 +1077,9 @@ export default class EditorFile {
// Ensure any native DOM selection is cleared on blur to avoid sticky selection handles
try {
document.getSelection()?.removeAllRanges();
} catch (_) {}
} catch (error) {
console.warn("Failed to clear native text selection.", error);
}
}
} else {
editorManager.container.style.display = "none";
Expand Down Expand Up @@ -1322,7 +1329,9 @@ export default class EditorFile {
if (activeFile?.id === this.id) {
emit("file-loaded", this);
}
} catch (_) {}
} catch (error) {
console.warn("Failed to emit interim file-loaded event.", error);
}

try {
const cacheFs = fsOperation(this.cacheFile);
Expand Down
Loading