diff --git a/src/config.ts b/src/config.ts index f3983f9..6364e77 100644 --- a/src/config.ts +++ b/src/config.ts @@ -46,6 +46,10 @@ function replacement(name: string): string|undefined { return path.dirname(vscode.window.activeTextEditor.document.uri.fsPath); return process.cwd(); } + if (name === 'workspaceFolderBasename' && + vscode.workspace.rootPath !== undefined) { + return path.basename(vscode.workspace.rootPath); + } const envPrefix = 'env:'; if (name.startsWith(envPrefix)) return process.env[name.substr(envPrefix.length)] ?? '';