diff --git a/src/session.ts b/src/session.ts index cd49cb13ab..a4288d328d 100644 --- a/src/session.ts +++ b/src/session.ts @@ -540,6 +540,11 @@ export class SessionManager implements Middleware { configurationSection: [ utils.PowerShellLanguageId, "files", "search" ], // fileEvents: vscode.workspace.createFileSystemWatcher('**/.eslintrc') }, + // NOTE: Some settings are only applicable on startup, so we send them during initialization. + initializationOptions: { + EnableProfileLoading: this.sessionSettings.enableProfileLoading, + InitialWorkingDirectory: this.sessionSettings.cwd, + }, errorHandler: { // Override the default error handler to prevent it from // closing the LanguageClient incorrectly when the socket diff --git a/src/settings.ts b/src/settings.ts index d1c648bff8..e8051ecf75 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -268,7 +268,7 @@ export function load(): ISettings { // is the reason terminals on macOS typically run login shells by default which set up // the environment. See http://unix.stackexchange.com/a/119675/115410" configuration.get("startAsLoginShell", defaultStartAsLoginShellSettings), - cwd: + cwd: // TODO: Should we resolve this path and/or default to a workspace folder? configuration.get("cwd", null), }; }