From f3497f380ec96c69089f8b17d98ca0012a59272e Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Tue, 14 Nov 2017 21:04:36 -0700 Subject: [PATCH 1/3] Add standard set of vscode workspace setting files Add an extensions.json file that will prompt folks to install extensions that are recommended for this workspace (c++, c#, powershell, cmake (editing syntax) and markdown linter. Add settings.json to start to configure C# syntax, PoweShell trim trailing whitespace and configure the markdown lint extension. Update launch.json to provide ability to debug PowerShell scripts. BTW I'm hoping as more people on the team use the VSCode extension , it will help get more attention to fixing some lingering issues in the PS extension. Dogfooding FTW!! --- .gitignore | 4 ---- .vscode/extensions.json | 11 +++++++++++ .vscode/launch.json | 18 ++++++++++++++++++ .vscode/settings.json | 16 ++++++++++++++++ 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index db319f5835e..5900f796f96 100644 --- a/.gitignore +++ b/.gitignore @@ -57,9 +57,6 @@ gen # Per repo profile .profile.ps1 -#VS Code files -.vscode - # macOS .DS_Store @@ -68,4 +65,3 @@ TestsResults*.xml # Resharper settings PowerShell.sln.DotSettings.user - diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..b0c23e31c2d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "ms-vscode.cpptools", + "ms-vscode.csharp", + "ms-vscode.PowerShell", + "twxs.cmake", + "DavidAnson.vscode-markdownlint" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json index 21343b2861b..edb8a9ac437 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,6 +18,24 @@ "request": "attach", "justMyCode": false, "processId": "${command:pickProcess}" + }, + { + "type": "PowerShell", + "request": "launch", + "name": "PowerShell Launch Current File", + "script": "${file}", + "args": [], + "cwd": "${file}" + }, + { + "type": "PowerShell", + "request": "launch", + "name": "PowerShell Launch Current File w/Args Prompt", + "script": "${file}", + "args": [ + "${command:SpecifyScriptArgs}" + ], + "cwd": "${file}" } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..3e3a03505d3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "editor.tabSize": 4, + "editor.insertSpaces": true, + "markdownlint.config": { + "MD004": false, + "MD024": false, + "MD033": false, + "MD034": false, + "MD038": false, + "MD042": false + }, + "[powershell]": { + "files.trimTrailingWhitespace": true + } +} From 2f3ec0502f5309ccf33a4eb2b1f0afcf5d28df12 Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Tue, 14 Nov 2017 21:19:03 -0700 Subject: [PATCH 2/3] Clean up grammar --- .vscode/settings.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3e3a03505d3..96208051484 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,9 @@ { "editor.tabSize": 4, "editor.insertSpaces": true, + + // Based on current .markdownlist.json settings: + // https://github.com/PowerShell/PowerShell/blob/master/.markdownlint.json "markdownlint.config": { "MD004": false, "MD024": false, @@ -10,6 +13,7 @@ "MD038": false, "MD042": false }, + "[powershell]": { "files.trimTrailingWhitespace": true } From d438fc9b64a900784cb782437d0d9c74a611d5da Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Tue, 14 Nov 2017 21:50:07 -0700 Subject: [PATCH 3/3] Instruct VSCode to ensure a final newline. If this is not wanted for certain file types, we can restrict this option to only specified file types. --- .vscode/settings.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 96208051484..b8279a4f500 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,8 @@ "editor.tabSize": 4, "editor.insertSpaces": true, + "files.insertFinalNewline": true, + // Based on current .markdownlist.json settings: // https://github.com/PowerShell/PowerShell/blob/master/.markdownlint.json "markdownlint.config": {