-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: Multi-folder VSCode workspaces not supported/ Documentation unclear #3399
Comments
I think this is mentioned here (although subtly; feel free to PR a better wording):
Multi-folder projects are I think difficult to make work, since each of them may have their own TS version/server. I don't know if VSCode itself supports it (vs just running the stock TS). |
^ Sure. At this point I'm happy running a single folder workspace. Perhaps the documentation here can mention that single folder workspace only is supported. |
I managed to make VSCode works with the integrations in multi-root workspaces. In my case, I had ESLint, Prettier, and TypeScript integrated. I copied the settings in the Here's the step to get to the workspaces settings.
Similarly, you will expect the same JSON structure in a {
"folders": [
{
"name": "directory-1",
"path": "path\\to\\directory-1"
},
{
"name": "directory-2",
"path": "path\\to\\directory-2"
}
],
"settings": {
+ "search.exclude": {
+ "**/.yarn": true,
+ "**/.pnp.*": true
+ },
+ "eslint.nodePath": ".yarn/sdks",
+ "prettier.prettierPath": ".yarn/sdks/prettier/index.js",
+ "typescript.tsdk": ".yarn/sdks/typescript/lib",
+ "typescript.enablePromptUseWorkspaceTsdk": true
}
} |
Hi! 👋 This issue looks stale, and doesn't feature the Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃 If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the |
Self-service
Describe the bug
The editor SDKs appear not to work in a VSCode multi folder workspace.
The work around is to use a single folder VSCode workspaces.
Can the documentation be updated to reflect this? Or is there a better work around?
To reproduce
Very similar to this issue:
#3350
yarn set version berry
yarn init
yarn add typescript -D
yarn add react
yarn add @types/react
import React from 'react'
yarn dlx @yarnpkg/sdks vscode
(Or checkout this repo https://github.com/dwjohnston/yarn2-vscode-issue)
Now:
❌ Doesn't work:
Open VSCode -> New Window -> ✨ Add folder to workspace✨ -> select your folder
In index.ts you have red squiggly lines and:
cmd + shift +p -> Select TypeScript version -> there is no option to select TypeScript version.
Go to
.vscode/setting.json
note thattypescript.tsdk
andtypescript.enablePromptUseWorkspaceTsdk
are greyed out with the message:See this discussion re that message: microsoft/vscode#82117
✅ Does work
Open VSCode -> New Window -> ❇️ Open❇️ -> select your folder
cmd + shift +p -> Select TypeScript version -> Select workspace version.
Squiggly lines solved.
Environment
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
Binaries:
Node: 14.17.0 - /private/var/folders/3_/7t918q9d1g9cpw7l31bzdmpwd8z945/T/xfs-c9b131cd/node
Yarn: 3.0.2 - /private/var/folders/3_/7t918q9d1g9cpw7l31bzdmpwd8z945/T/xfs-c9b131cd/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
Version: 1.60.0
Additional context
No response
The text was updated successfully, but these errors were encountered: