There's a few questions related to renaming or setting a terminal profile:
But if you want to define this via settings.json per folder, how would you do it?
There's a few questions related to renaming or setting a terminal profile:
But if you want to define this via settings.json per folder, how would you do it?
The answer is that it can only be done for the workspace.
Workspace.code-workspace eg:
{
"settings": {
"powershell.powerShellDefaultVersion": "PowerShell (x64)",
"python.envFile": "${workspaceFolder}/.venv",
"terminal.integrated.profiles.windows": {
"myprofilename": {
"source": "PowerShell",
"overrideName": true,
"icon": "terminal-powershell"
}
}
}
}
This will create the myprofilename
as a selection for new terminal options.
However, if you want to set the default in a multi root workspace, at a folder level:
eg: somefolder_in_workspace/.vscode/settings.json:
{
"terminal.integrated.defaultProfile.windows": "myprofilename"
}
You'll see the line greyed out with a message if you hover: This setting cannot be applied in this workspace. It will be applied when you open the containing workspace folder directly.
This is how the documentation explains the behaviour:
To avoid setting collisions, only resource (file, folder) settings are applied when using a multi-root workspace. Settings that affect the entire editor (for example, UI layout) are ignored. For example, two projects cannot both set the zoom level.
So the answer is no, for folders in multi root workspaces, but yes, if you want the name for the workspace terminal