(
settingName: string,
)
| 180 | |
| 181 | // Get the ConfigurationTarget (read: scope) of where the *effective* setting value comes from |
| 182 | export function getEffectiveConfigurationTarget( |
| 183 | settingName: string, |
| 184 | ): vscode.ConfigurationTarget | undefined { |
| 185 | const configuration = vscode.workspace.getConfiguration( |
| 186 | utils.PowerShellLanguageId, |
| 187 | ); |
| 188 | const detail = configuration.inspect(settingName); |
| 189 | if (detail === undefined) { |
| 190 | return undefined; |
| 191 | } else if (typeof detail.workspaceFolderValue !== "undefined") { |
| 192 | return vscode.ConfigurationTarget.WorkspaceFolder; |
| 193 | } else if (typeof detail.workspaceValue !== "undefined") { |
| 194 | return vscode.ConfigurationTarget.Workspace; |
| 195 | } else if (typeof detail.globalValue !== "undefined") { |
| 196 | return vscode.ConfigurationTarget.Global; |
| 197 | } |
| 198 | return undefined; |
| 199 | } |
| 200 | |
| 201 | export async function changeSetting( |
| 202 | settingName: string, |
no outgoing calls
no test coverage detected