-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vscode): bring upstream VSCode fixes in (#4648)
- Loading branch information
Showing
4 changed files
with
83 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { initialize as initializeMonacoServices } from 'vscode/services'; | ||
import { initialize as initializeVscodeExtensions } from 'vscode/extensions'; | ||
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions'; | ||
import { registerServiceInitializeParticipant } from 'vscode/lifecycle'; | ||
import 'vscode/localExtensionHost'; | ||
|
||
import lazyMonacoContribution from './monaco-contribution/index.js'; | ||
|
||
|
@@ -33,7 +35,12 @@ function afterLoad(system) { | |
|
||
(async () => { | ||
try { | ||
await Promise.all([initializeMonacoServices({}), initializeVscodeExtensions()]); | ||
/** | ||
* {@link https://github.com/CodinGame/monaco-vscode-api/issues/283} | ||
* @TODO([email protected]): this can go away with next release of vscode >1.83.15 | ||
*/ | ||
registerServiceInitializeParticipant((accessor) => accessor.get(IExtensionService)); | ||
await initializeMonacoServices({}); | ||
system.monacoInitializationDeferred().resolve(); | ||
} catch (error) { | ||
system.monacoInitializationDeferred().reject(error); | ||
|
@@ -42,7 +49,7 @@ function afterLoad(system) { | |
} | ||
})(); | ||
|
||
lazyMonacoContribution(); | ||
lazyMonacoContribution({ system }); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
import * as monaco from 'monaco-editor'; | ||
import { StandaloneServices, IStorageService } from 'vscode/services'; | ||
/** | ||
* This is quick fix for displaying command palette. | ||
* | ||
* {@link https://github.com/CodinGame/monaco-vscode-api/issues/267} | ||
* @TODO([email protected]): this can be removed with next VSCode API release. | ||
*/ | ||
import 'vscode/vscode/vs/workbench/browser/workbench.contribution'; | ||
|
||
import goToSymbolActionDescriptor from './actions/go-to-symbol.js'; | ||
|
||
const lazyMonacoContribution = () => { | ||
const lazyMonacoContribution = ({ system }) => { | ||
const disposables = []; | ||
|
||
StandaloneServices.get(IStorageService).store('expandSuggestionDocs', true, 0, 0); | ||
system.monacoInitializationDeferred().promise.then(() => { | ||
StandaloneServices.get(IStorageService).store('expandSuggestionDocs', true, 0, 0); | ||
}); | ||
|
||
// setup custom actions | ||
disposables.push( | ||
|