Skip to content

Commit 3e51adc

Browse files
Merge pull request #472 from gjsjohnmurray/fix-471
fix #471 give OE-opened files a "(read-only)" suffix (requires proposed API)
2 parents 6597a9d + b1ffd4a commit 3e51adc

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
@@ -587,6 +587,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
587587
},
588588
})
589589
: null,
590+
packageJson.enableProposedApi && typeof vscode.workspace.registerResourceLabelFormatter === "function"
591+
? vscode.workspace.registerResourceLabelFormatter({
592+
scheme: OBJECTSCRIPT_FILE_SCHEMA,
593+
formatting: {
594+
label: "${path} (read-only)",
595+
separator: "/",
596+
},
597+
})
598+
: null,
590599
].filter(notNull);
591600

592601
if (proposed.length > 0) {

0 commit comments

Comments
 (0)