You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13007,6 +13038,37 @@ This works without the need of spawning multiple instances of `ts_ls`, saving me
13007
13038
13008
13039
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
13009
13040
13041
+
Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
13042
+
expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
13043
+
mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
13044
+
or deno.jsonc.
13045
+
13046
+
Example:
13047
+
13048
+
```
13049
+
project-root
13050
+
+-- node_modules/...
13051
+
+-- package-lock.json
13052
+
+-- package.json
13053
+
+-- packages
13054
+
+-- deno-module
13055
+
| +-- deno.json
13056
+
| +-- package.json <-- It's normal for Deno projects to have package.json files!
13057
+
| +-- src
13058
+
| +-- index.ts <-- this is a Deno file
13059
+
+-- node-module
13060
+
+-- package.json
13061
+
+-- src
13062
+
+-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
13063
+
```
13064
+
13065
+
From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
13066
+
From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
13067
+
From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
13068
+
If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
13069
+
If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
13070
+
Otherwise, attach at PROJECT ROOT, or the cwd if not found.
@@ -13115,18 +13177,49 @@ This works without the need of spawning multiple instances of `tsgo`, saving mem
13115
13177
13116
13178
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
13117
13179
13180
+
Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
13181
+
expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
13182
+
mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
13183
+
or deno.jsonc.
13184
+
13185
+
Example:
13186
+
13187
+
```
13188
+
project-root
13189
+
+-- node_modules/...
13190
+
+-- package-lock.json
13191
+
+-- package.json
13192
+
+-- packages
13193
+
+-- deno-module
13194
+
| +-- deno.json
13195
+
| +-- package.json <-- It's normal for Deno projects to have package.json files!
13196
+
| +-- src
13197
+
| +-- index.ts <-- this is a Deno file
13198
+
+-- node-module
13199
+
+-- package.json
13200
+
+-- src
13201
+
+-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
13202
+
```
13203
+
13204
+
From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
13205
+
From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
13206
+
From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
13207
+
If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
13208
+
If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
13209
+
Otherwise, attach at PROJECT ROOT, or the cwd if not found.
@@ -14218,6 +14311,8 @@ This works without the need of spawning multiple instances of `vtsls`, saving me
14218
14311
14219
14312
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
14220
14313
14314
+
This includes the same Deno-excluding logic from `ts_ls`. It is not recommended to enable both `vtsls` and `ts_ls` at the same time!
0 commit comments