Register additional editor overrides when adding new notebook file types (#17708)

* Also standardized file extension contributions to always start with a period, and to always do lower case string comparisons for file extensions.
This commit is contained in:
Cory Rivera
2021-11-19 09:14:41 -08:00
committed by GitHub
parent 09666bc4e8
commit 8e04d3992a
8 changed files with 64 additions and 50 deletions

View File

@@ -147,7 +147,7 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape {
// preserve pre 1.38 behaviour to not make group active when preserveFocus: true
// but make sure to restore the editor to fix https://github.com/microsoft/vscode/issues/79633
activation: options.preserveFocus ? EditorActivation.RESTORE : undefined,
override: notebookFileTypes?.some(ext => uri?.fsPath?.toLowerCase().endsWith(ext)) || uri?.fsPath?.toLowerCase().endsWith('sql') ? undefined : EditorOverride.DISABLED // {{SQL CARBON EDIT}}
override: notebookFileTypes?.some(ext => uri?.fsPath?.toLowerCase().endsWith(ext)) || uri?.fsPath?.toLowerCase().endsWith('.sql') ? undefined : EditorOverride.DISABLED // {{SQL CARBON EDIT}}
};
const input: IResourceEditorInput = {