Skip to content

Commit b1ffd4a

Browse files
committed
fix #471 give OE-opened files a "(read-only)" suffix (requires proposed API)
1 parent b1b475b commit b1ffd4a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/extension.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
586586
},
587587
})
588588
: null,
589+
packageJson.enableProposedApi && typeof vscode.workspace.registerResourceLabelFormatter === "function"
590+
? vscode.workspace.registerResourceLabelFormatter({
591+
scheme: OBJECTSCRIPT_FILE_SCHEMA,
592+
formatting: {
593+
label: "${path} (read-only)",
594+
separator: "/",
595+
},
596+
})
597+
: null,
589598
].filter(notNull);
590599

591600
if (proposed.length > 0) {

0 commit comments

Comments
 (0)