Skip to content

Commit 8adb6d5

Browse files
committed
Group log messages for server activation
1 parent f90eaea commit 8adb6d5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/extension.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,6 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
149149
return;
150150
}
151151

152-
// If we're operating on a standalone file (i.e. not in a folder) then we need
153-
// to launch the server in a reasonable current directory. Otherwise the cradle
154-
// guessing logic in hie-bios will be wrong!
155-
let cwdMsg = `Activating the language server in working dir: ${config.workingDir}`;
156-
if (folder) {
157-
cwdMsg += ' (the workspace folder)';
158-
} else {
159-
cwdMsg += ` (parent dir of loaded file ${uri.fsPath})`;
160-
}
161-
logger.info(cwdMsg);
162-
163152
const serverEnvironment: IEnvVars = initServerEnvironment(config, hlsExecutable);
164153
const exeOptions: ExecutableOptions = {
165154
cwd: config.workingDir,
@@ -173,6 +162,17 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
173162
debug: { command: hlsExecutable.location, args: config.serverArgs, options: exeOptions },
174163
};
175164

165+
// If we're operating on a standalone file (i.e. not in a folder) then we need
166+
// to launch the server in a reasonable current directory. Otherwise the cradle
167+
// guessing logic in hie-bios will be wrong!
168+
let cwdMsg = `Activating the language server in working dir: ${config.workingDir}`;
169+
if (folder) {
170+
cwdMsg += ' (the workspace folder)';
171+
} else {
172+
cwdMsg += ` (parent dir of loaded file ${uri.fsPath})`;
173+
}
174+
logger.info(cwdMsg);
175+
176176
logger.info(`run command: ${hlsExecutable.location} ${config.serverArgs.join(' ')}`);
177177
logger.info(`debug command: ${hlsExecutable.location} ${config.serverArgs.join(' ')}`);
178178
if (exeOptions.cwd) {

0 commit comments

Comments
 (0)