Support variables when resolving values in settings
See original GitHub issueHi,
I was just reading the latest updates and it says one can install typescript@next
globally and then set typescript.tsdk
so VS Code can use the appropriate version/installation. In a team environment, I’d like to put that setting in our project, something like:
.vscode/settings.json
:
{
"typescript.tsdk": "%APPDATA%/npm/node_modules/typescript/lib"
}
The problem is restarting VS Code results in an error:
The path c:\Projects\Derp\%APPDATA%\npm\node_modules\typescript\lib doesn't point to a valid tsserver install. TypeScript language features will be disabled.
Now the setting needs to be per-person because I highly doubt my teammates have tsc
installed in C:\Users\Olson\AppData\Roaming\npm\node_modules\typescript\lib
😉
Could we get environment variables evaluated on that and all other settings that involve paths?
I haven’t tested other paths, but I see these in the Default Settings:
git.path
markdown.styles
json.schemas
typescript.tsdk
php.validate.executablePath
Issue Analytics
- State:
- Created 8 years ago
- Reactions:626
- Comments:164 (52 by maintainers)
Top Results From Across the Web
Variables reference - Visual Studio Code
Variables Reference. Visual Studio Code supports variable substitution in Debugging and Task configuration files as well as some select settings.
Read more >Resolution of Variables - Ivanti
Variables are generally resolved when executing eScripts or, for example, during an internal program flow. The following rules apply: Every variable between ...
Read more >User variables are not resolved correctly in Windows
Fixes an issue in which user variables are not resolved correctly in Windows 8.1, Windows Server 2012 R2, Windows 7 SP1, or Windows...
Read more >User Variables and Environments
To use the value of a variable, configure a setting using a variable name instead of a data value. In the GSE, a...
Read more >Using variables | Postman Learning Center
The same principle applies to any part of your request where data is repeated. Whatever value is stored in the variable will be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Am I to understand that this issue has been open for six years, now? Still no way to use environment variables in
settings.json
?I’d like to +1 this issue as well. We pull our code base into different drive locations (R:, F:, C:\ etc) and so being able to use a variable such as ${folderPath} in our settings.json would be an immense help!