Closed supermomonga closed 1 year ago
https://code.visualstudio.com/docs/editor/variables-reference
If we can use ${workspaceFolder} variable in settings.json, config value will be more portable, so we can commit a settings.json to git repository and share it between different environments.
${workspaceFolder}
{ "mql_tools.Metaeditor.Include4Dir": "${workspaceFolder}/mql4/Include", "mql_tools.Metaeditor.Include5Dir": "${workspaceFolder}/mql5/Include", "mql_tools.Metaeditor.Metaeditor5Dir": "${workspaceFolder}/terminal/metaeditor64.exe", "mql_tools.Metaeditor.Metaeditor4Dir": "${workspaceFolder}/terminal/metaeditor.exe", }
Unfortunately, I think VSCode doesn't expose variable resolver for now.
https://github.com/microsoft/vscode/issues/46471
For example, MS's official vscode-js-debug extension seems have their own resolver code. https://github.com/microsoft/vscode-js-debug/blob/059d70420acc901a9fda413b42a154783dccf208/src/configuration.ts#L1086-L1099
so vscode-js-debug accepts following configs.
{ "debug.javascript.autoAttachSmartPattern": [ "${workspaceFolder}/**", "!**/node_modules/**", "**/$KNOWN_TOOLS$/**" ] }
In the following releases, I will add the ability to use '${workspaceFolder}'.
Description
https://code.visualstudio.com/docs/editor/variables-reference
If we can use
${workspaceFolder}
variable in settings.json, config value will be more portable, so we can commit a settings.json to git repository and share it between different environments.Implimentation
Unfortunately, I think VSCode doesn't expose variable resolver for now.
https://github.com/microsoft/vscode/issues/46471
For example, MS's official vscode-js-debug extension seems have their own resolver code. https://github.com/microsoft/vscode-js-debug/blob/059d70420acc901a9fda413b42a154783dccf208/src/configuration.ts#L1086-L1099
so vscode-js-debug accepts following configs.