From bcd96a75a7482c6a6f379cc32151ec0f4859900e Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 14 Jan 2022 16:25:43 -0800 Subject: [PATCH 1/6] Indent workspace configuration with two spaces --- .editorconfig | 2 +- extension-dev.code-workspace | 42 ++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.editorconfig b/.editorconfig index 84e1b49326..9ad197dff6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,5 +6,5 @@ indent_style = space indent_size = 4 insert_final_newline = true -[*.{json,yaml,yml}] +[*.{json,yaml,yml,code-workspace}] indent_size = 2 diff --git a/extension-dev.code-workspace b/extension-dev.code-workspace index fc9c8b1cfd..7e550bd0a9 100644 --- a/extension-dev.code-workspace +++ b/extension-dev.code-workspace @@ -1,24 +1,24 @@ { - "folders": [ - { - "path": "." - }, - { - "path": "../PowerShellEditorServices" - } - ], - "settings": { - "files.associations": { - "**/snippets/*.json": "jsonc", - "**/.vsts-ci/**/*.yml": "azure-pipelines", - }, - "typescript.tsdk": "./node_modules/typescript/lib", - "powershell.codeFormatting.autoCorrectAliases": true, - "powershell.codeFormatting.newLineAfterCloseBrace": false, - "powershell.codeFormatting.trimWhitespaceAroundPipe": true, - "powershell.codeFormatting.useCorrectCasing": true, - "powershell.codeFormatting.whitespaceBeforeOpenBrace": false, - "powershell.codeFormatting.whitespaceBetweenParameters": true, - "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline" + "folders": [ + { + "path": "." + }, + { + "path": "../PowerShellEditorServices" } + ], + "settings": { + "files.associations": { + "**/snippets/*.json": "jsonc", + "**/.vsts-ci/**/*.yml": "azure-pipelines", + }, + "typescript.tsdk": "./node_modules/typescript/lib", + "powershell.codeFormatting.autoCorrectAliases": true, + "powershell.codeFormatting.newLineAfterCloseBrace": false, + "powershell.codeFormatting.trimWhitespaceAroundPipe": true, + "powershell.codeFormatting.useCorrectCasing": true, + "powershell.codeFormatting.whitespaceBeforeOpenBrace": false, + "powershell.codeFormatting.whitespaceBetweenParameters": true, + "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline" + } } From 886943a19d9bd234601a735d9cccdc20cf37fcc7 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 14 Jan 2022 16:34:28 -0800 Subject: [PATCH 2/6] Add Editor Services launch configuration to workspace --- extension-dev.code-workspace | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/extension-dev.code-workspace b/extension-dev.code-workspace index 7e550bd0a9..e7c72da895 100644 --- a/extension-dev.code-workspace +++ b/extension-dev.code-workspace @@ -20,5 +20,24 @@ "powershell.codeFormatting.whitespaceBeforeOpenBrace": false, "powershell.codeFormatting.whitespaceBetweenParameters": true, "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline" + }, + "launch": { + "version": "0.2.0", + "configurations": [ + { + // https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": "Attach to Editor Services", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}", + "justMyCode": false, + "suppressJITOptimizations": true, + "symbolOptions": { + "searchPaths": [], + "searchMicrosoftSymbolServer": true, + "searchNuGetOrgSymbolServer": true + } + } + ] } } From 9a3ae6895c2c30b7bad20e6b54d74572a04fcc73 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 14 Jan 2022 16:38:54 -0800 Subject: [PATCH 3/6] Migrate extension recommendations to workspace --- .vscode/extensions.json | 11 ----------- extension-dev.code-workspace | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 5bfa441111..0000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - "editorconfig.editorconfig", - "ms-azure-devops.azure-pipelines", - "ms-vscode.powershell", - "ms-vscode.vscode-typescript-tslint-plugin", - "davidanson.vscode-markdownlint" - ] -} diff --git a/extension-dev.code-workspace b/extension-dev.code-workspace index e7c72da895..184955fcba 100644 --- a/extension-dev.code-workspace +++ b/extension-dev.code-workspace @@ -7,6 +7,16 @@ "path": "../PowerShellEditorServices" } ], + "extensions": { + "recommendations": [ + "davidanson.vscode-markdownlint", + "editorconfig.editorconfig", + "ms-azure-devops.azure-pipelines", + "ms-dotnettools.csharp", + "ms-vscode.powershell-preview", + "ms-vscode.vscode-typescript-tslint-plugin", + ] + }, "settings": { "files.associations": { "**/snippets/*.json": "jsonc", From 8b674042b919b85cf134291ff9619cd8aae11019 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 14 Jan 2022 17:23:26 -0800 Subject: [PATCH 4/6] Migrate tasks to workspace --- .vscode/tasks.json | 73 ------------------ extension-dev.code-workspace | 139 +++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 73 deletions(-) delete mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 5b0b6fb20f..0000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": "2.0.0", - "windows": { - "options": { - "shell": { - "executable": "pwsh.exe", - "args": [ - "-NoProfile", - "-ExecutionPolicy", - "Bypass", - "-Command" - ] - } - } - }, - "linux": { - "options": { - "shell": { - "executable": "pwsh", - "args": [ - "-NoProfile", - "-Command" - ] - } - } - }, - "osx": { - "options": { - "shell": { - "executable": "/usr/local/bin/pwsh", - "args": [ - "-NoProfile", - "-Command" - ] - } - } - }, - "tasks": [ - { - "label": "Restore", - "type": "shell", - "command": "Invoke-Build Restore", - "problemMatcher": [] - }, - { - "label": "Clean", - "type": "shell", - "command": "Invoke-Build Clean", - "problemMatcher": [] - }, - { - "label": "Build", - "type": "shell", - "command": "Invoke-Build Build", - "problemMatcher": [], - "group": "build" - }, - { - "label": "Test", - "type": "shell", - "command": "Invoke-Build Test", - "problemMatcher": [], - "group": "test" - }, - { - "label": "Package", - "type": "shell", - "command": "Invoke-Build Package", - "problemMatcher": [], - "group": "build" - } - ] -} diff --git a/extension-dev.code-workspace b/extension-dev.code-workspace index 184955fcba..3d068bcde4 100644 --- a/extension-dev.code-workspace +++ b/extension-dev.code-workspace @@ -1,9 +1,11 @@ { "folders": [ { + "name": "Client", "path": "." }, { + "name": "Server", "path": "../PowerShellEditorServices" } ], @@ -31,6 +33,143 @@ "powershell.codeFormatting.whitespaceBetweenParameters": true, "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline" }, + "tasks": { + "version": "2.0.0", + "windows": { + "options": { + "shell": { + "executable": "pwsh.exe", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-Command" + ] + } + } + }, + "linux": { + "options": { + "shell": { + "executable": "pwsh", + "args": [ + "-NoProfile", + "-Command" + ] + } + } + }, + "osx": { + "options": { + "shell": { + "executable": "/usr/local/bin/pwsh", + "args": [ + "-NoProfile", + "-Command" + ] + } + } + }, + "tasks": [ + { + "label": "Build", + "type": "shell", + "options": { + "cwd": "${workspaceFolder:Client}" + }, + "command": "Invoke-Build LinkEditorServices,Build", + "problemMatcher": [ + "$msCompile", + "$tsc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Test Client", + "type": "shell", + "options": { + "cwd": "${workspaceFolder:Client}" + }, + "command": "Invoke-Build LinkEditorServices,Test", + "problemMatcher": [ + "$msCompile", + "$tsc" + ], + "group": { + "kind": "test", + "isDefault": true + } + }, + { + "label": "Test Server", + "type": "shell", + "options": { + "cwd": "${workspaceFolder:Server}" + }, + "problemMatcher": [ + "$msCompile" + ], + "command": "Invoke-Build TestServerPS72", + "group": { + "kind": "test", + "isDefault": true + } + }, + { + "label": "Invoke-Build Client", + "type": "shell", + "options": { + "cwd": "${workspaceFolder:Client}" + }, + "command": "Invoke-Build ${input:clientBuildCommand}", + "group": "build" + }, + { + "label": "Invoke-Build Server", + "type": "shell", + "options": { + "cwd": "${workspaceFolder:Server}" + }, + "command": "Invoke-Build ${input:serverBuildCommand}", + "group": "build" + } + ], + "inputs": [ + { + "type": "pickString", + "id": "clientBuildCommand", + "description": "Which Invoke-Build Client Task?", + "options": [ + "Restore", + "Clean", + "LinkEditorServices", + "Build", + "Test", + "Package" + ], + "default": "Clean" + }, + { + "type": "pickString", + "id": "serverBuildCommand", + "description": "Which Invoke-Build Server Task?", + "options": [ + "SetupDotNet", + "BinClean", + "Clean", + "Build", + "Test", + "TestServer", + "TestServerPS72", + "TestE2E", + ], + "default": "Clean" + } + ] + }, "launch": { "version": "0.2.0", "configurations": [ From c9b35e40bceca98e4cbdf05faa9ad550117c26dc Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 14 Jan 2022 17:32:04 -0800 Subject: [PATCH 5/6] Migrate launch configurations to workspace --- .vscode/launch.json | 41 ------------------------------------ extension-dev.code-workspace | 34 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 41 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 467945da05..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "0.1.0", - "configurations": [ - { - "name": "Launch Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--disable-extensions", - "--extensionDevelopmentPath=${workspaceFolder}" - ], - "sourceMaps": true, - "outFiles": [ "${workspaceFolder}/out/main.js" ], - "preLaunchTask": "Build" - }, - { - "name": "Launch Extension Tests", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - // The tests require Code be opened with a workspace, which exists in - // `test`, but this has to be passed as a CLI argument, not just `cwd`. - "${workspaceFolder}/test", - "--disableExtensions", - "--extensionDevelopmentPath=${workspaceFolder}", - "--extensionTestsPath=${workspaceFolder}/out/test/index.js", - ], - "sourceMaps": true, - "outFiles": [ "${workspaceFolder}/out/test/**/*.js" ], - "preLaunchTask": "Build" - }, - { - "name": "PowerShell Launch Current File", - "type": "PowerShell", - "request": "launch", - "script": "${file}", - }, - ] -} diff --git a/extension-dev.code-workspace b/extension-dev.code-workspace index 3d068bcde4..86f557f759 100644 --- a/extension-dev.code-workspace +++ b/extension-dev.code-workspace @@ -186,6 +186,40 @@ "searchMicrosoftSymbolServer": true, "searchNuGetOrgSymbolServer": true } + }, + { + "name": "Launch Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--disable-extensions", + "--extensionDevelopmentPath=${workspaceFolder:Client}" + ], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder:Client}/out/main.js" + ], + "preLaunchTask": "Build", + }, + { + "name": "Launch Extension Tests", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + // The tests require Code be opened with a workspace, which exists in + // `test`, but this has to be passed as a CLI argument, not just `cwd`. + "${workspaceFolder:Client}/test", + "--disableExtensions", + "--extensionDevelopmentPath=${workspaceFolder:Client}", + "--extensionTestsPath=${workspaceFolder:Client}/out/test/index.js", + ], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder:Client}/out/test/**/*.js" + ], + "preLaunchTask": "Build" } ] } From 4b665f49207a0f71bd56cd279e2a57807db19b79 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 14 Jan 2022 17:44:40 -0800 Subject: [PATCH 6/6] Migrate settings to workspace --- .vscode/settings.json | 26 -------------------------- extension-dev.code-workspace | 13 ++++++++++++- 2 files changed, 12 insertions(+), 27 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index d0e0a1929b..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,26 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "editor.tabSize": 4, - "editor.insertSpaces": true, - "files.trimTrailingWhitespace": true, - // Add a visual ruler for the typescript linting line length - "editor.rulers": [ - 120 - ], - "files.associations": { - // Use JSONC instead of JSON because (1) that's how VS Code interprets snippet files, and (2) it enables better source documentation. - "**/snippets/*.json": "jsonc" - }, - "search.exclude": { - "**/node_modules": true, - "**/bower_components": true, - "logs/": true, - "out/": true - }, - // Lock the TypeScript SDK path to the version we use - "typescript.tsdk": "./node_modules/typescript/lib", - // Ignore the MD rule: - "markdownlint.config": { - "MD024": false // no-duplicate-header - } -} diff --git a/extension-dev.code-workspace b/extension-dev.code-workspace index 86f557f759..5c4ec06c20 100644 --- a/extension-dev.code-workspace +++ b/extension-dev.code-workspace @@ -20,11 +20,22 @@ ] }, "settings": { + "editor.tabSize": 4, + "editor.insertSpaces": true, + "files.trimTrailingWhitespace": true, + "files.insertFinalNewline": true, "files.associations": { + // Use JSONC instead of JSON because (1) that's how VS Code interprets + // snippet files, and (2) it enables better source documentation. "**/snippets/*.json": "jsonc", "**/.vsts-ci/**/*.yml": "azure-pipelines", }, - "typescript.tsdk": "./node_modules/typescript/lib", + // Ignore the Markdown rule: + "markdownlint.config": { + "MD024": false // no-duplicate-header + }, + // Lock the TypeScript SDK path to the version we use + "typescript.tsdk": "${workspaceFolder:Client}/node_modules/typescript/lib", "powershell.codeFormatting.autoCorrectAliases": true, "powershell.codeFormatting.newLineAfterCloseBrace": false, "powershell.codeFormatting.trimWhitespaceAroundPipe": true,