Skip to content

Commit

Permalink
Fix langiumClient and update monaco-editor-workers to 0.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Jul 28, 2023
1 parent 0186abb commit f8d4410
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 35 deletions.
35 changes: 16 additions & 19 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/examples/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"express": "~4.18.2",
"langium": "~1.2.1",
"langium-statemachine-dsl": "~1.2.0",
"monaco-editor-workers": "0.39.1",
"monaco-editor-workers": "0.40.0",
"monaco-languageclient": "6.3.0-next.1",
"normalize-url": "~8.0.0",
"react": "~18.2.0",
Expand Down
16 changes: 4 additions & 12 deletions packages/examples/main/src/langium/langiumClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* ------------------------------------------------------------------------------------------ */

import 'monaco-editor/esm/vs/editor/editor.all.js';
import 'monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js';
import 'monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js';
import { editor, Uri } from 'monaco-editor/esm/vs/editor/editor.api.js';

Expand All @@ -13,7 +12,7 @@ import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserve
import { CloseAction, ErrorAction, MessageTransports } from 'vscode-languageclient';

import { createConfiguredEditor } from 'vscode/monaco';
import { registerExtension } from 'vscode/extensions';
import { ExtensionHostKind, registerExtension } from 'vscode/extensions';
import { updateUserConfiguration } from 'vscode/service-override/configuration';
import 'vscode/default-extensions/theme-defaults';

Expand Down Expand Up @@ -49,18 +48,11 @@ const setup = async () => {
}]
}
};
const { registerFile: registerExtensionFile } = registerExtension(extension);
const { registerFileUrl } = registerExtension(extension, ExtensionHostKind.LocalProcess);

// these two files are taken from the langium-vscode
registerExtensionFile('/langium-configuration.json', async () => {
const langiumLanguageConfig = new URL('./src/langium/langium.configuration.json', window.location.href).href;
return (await fetch(langiumLanguageConfig)).text();
});

registerExtensionFile('/langium-grammar.json', async () => {
const langiumTmUrl = new URL('./src/langium/langium.tmLanguage.json', window.location.href).href;
return (await fetch(langiumTmUrl)).text();
});
registerFileUrl('/langium-configuration.json', new URL('./src/langium/langium.configuration.json', window.location.href).href);
registerFileUrl('/langium-grammar.json', new URL('./src/langium/langium.tmLanguage.json', window.location.href).href);

// set vscode configuration parameters
updateUserConfiguration(`{
Expand Down
1 change: 0 additions & 1 deletion packages/examples/main/src/langium/statemachineClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const setup = async () => {
}
};
const { registerFileUrl } = registerExtension(extension, ExtensionHostKind.LocalProcess);
// const api = await getApi();

registerFileUrl('/statemachine-configuration.json', new URL('../../../node_modules/langium-statemachine-dsl/language-configuration.json', window.location.href).href);
registerFileUrl('/statemachine-grammar.json', new URL('../../../node_modules/langium-statemachine-dsl/syntaxes/statemachine.tmLanguage.json', window.location.href).href);
Expand Down
3 changes: 2 additions & 1 deletion packages/verify/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"private": true,
"type": "module",
"dependencies": {
"monaco-editor-workers": "0.39.1",
"monaco-editor-workers": "0.40.0",
"monaco-languageclient": "6.3.0-next.1",
"examples-main": "../../examples/main",
"vscode-ws-jsonrpc": "3.0.0",
"normalize-url": "~8.0.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/verify/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"private": true,
"type": "module",
"dependencies": {
"monaco-editor-workers": "0.39.1",
"monaco-editor-workers": "0.40.0",
"monaco-languageclient": "6.3.0-next.1",
"examples-main": "../../examples/main",
"vscode-ws-jsonrpc": "3.0.0",
"normalize-url": "~8.0.0"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/verify/webpack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
},
"references": [{
"path": "../../client/tsconfig.src.json"
},
{
"path": "../../examples/main/tsconfig.src.json"
}],
"include": [
"src/**/*.ts",
Expand Down

0 comments on commit f8d4410

Please sign in to comment.