Skip to content

Commit b91e99d

Browse files
committed
Update to Langium 0.5.0
1 parent 632a371 commit b91e99d

File tree

5 files changed

+121
-80
lines changed

5 files changed

+121
-80
lines changed

.vscode/launch.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@
1616
},
1717
{
1818
"name": "Attach to Language Server",
19-
"type": "pwa-node",
19+
"type": "node",
2020
"port": 6009,
2121
"request": "attach",
2222
"skipFiles": [
2323
"<node_internals>/**"
2424
],
2525
"sourceMaps": true,
2626
"outFiles": [
27-
"${workspaceFolder}/out/**/*.js"
27+
"${workspaceFolder}/out/**/*.js",
28+
"${workspaceFolder}/node_modules/langium/**/*.js"
2829
]
2930
}
3031
]

package-lock.json

Lines changed: 111 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
"chevrotain": "^9.1.0",
4848
"colors": "^1.4.0",
4949
"commander": "^8.0.0",
50-
"langium": "^0.4.0",
51-
"vscode-languageclient": "^7.0.0",
52-
"vscode-languageserver": "^7.0.0",
50+
"langium": "0.5.0",
51+
"vscode-languageclient": "8.0.2",
52+
"vscode-languageserver": "8.0.2",
5353
"vscode-uri": "^3.0.2"
5454
},
5555
"devDependencies": {
@@ -58,7 +58,7 @@
5858
"@typescript-eslint/eslint-plugin": "^4.14.1",
5959
"@typescript-eslint/parser": "^4.14.1",
6060
"eslint": "^7.19.0",
61-
"langium-cli": "^0.4.0",
61+
"langium-cli": "0.5.0",
6262
"typescript": "^4.6.2"
6363
}
6464
}

src/language-server/lox-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const LoxModule: Module<LoxServices, PartialLangiumServices & LoxAddedSer
4747
* @param context Optional module context with the LSP connection
4848
* @returns An object wrapping the shared services and the language-specific services
4949
*/
50-
export function createLoxServices(context?: DefaultSharedModuleContext): {
50+
export function createLoxServices(context: DefaultSharedModuleContext): {
5151
shared: LangiumSharedServices,
5252
Lox: LoxServices
5353
} {

src/language-server/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { startLanguageServer } from 'langium';
2+
import { NodeFileSystem } from 'langium/node';
23
import { createConnection, ProposedFeatures } from 'vscode-languageserver/node';
34
import { createLoxServices } from './lox-module';
45

56
// Create a connection to the client
67
const connection = createConnection(ProposedFeatures.all);
78

89
// Inject the shared services and language-specific services
9-
const { shared } = createLoxServices({ connection });
10+
const { shared } = createLoxServices({ connection, ...NodeFileSystem });
1011

1112
// Start the language server with the shared services
1213
startLanguageServer(shared);

0 commit comments

Comments
 (0)