Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit 17ca8e1

Browse files
authored
Update to recommended way of running language server v3 (#452)
1 parent c5bcfce commit 17ca8e1

File tree

5 files changed

+22
-590
lines changed

5 files changed

+22
-590
lines changed

src/main.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,18 @@ describe("test suite", () => {
191191
DEBUG_BREAK: "FALSE",
192192
DEBUG_PORT: "undefined",
193193
INSTALL_DIR: undefined,
194-
TSLIB_PATH: "/tsLibPath",
195194
WORKSPACE_DIR: "/workspace",
196195
},
197196
path: "/extension/run.sh",
198197
type: "stdio",
199198
},
200199
{
201-
initializationOptions: { preferences: "user preferences" },
200+
initializationOptions: {
201+
preferences: "user preferences",
202+
tsserver: {
203+
path: "/tsLibPath/tsserver.js",
204+
},
205+
},
202206
syntaxes: ["typescript", "tsx", "cts", "mts", "javascript", "jsx"],
203207
}
204208
);

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ async function asyncActivate() {
152152
syntaxes.push("javascript", "jsx");
153153
}
154154
const env = {
155-
TSLIB_PATH: tslibPath,
156155
WORKSPACE_DIR: nova.workspace.path ?? "",
157156
INSTALL_DIR: dependencyManagement.getDependencyDirectory(),
158157
DEBUG: nova.config.get(
@@ -183,6 +182,9 @@ async function asyncActivate() {
183182
{
184183
syntaxes,
185184
initializationOptions: {
185+
tsserver: {
186+
path: nova.path.join(tslibPath, "tsserver.js"),
187+
},
186188
preferences: getUserPreferences(),
187189
},
188190
}

0 commit comments

Comments
 (0)