From cef7762d18de8fa411882fafcef1ffde1997c0ba Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Wed, 15 Nov 2017 00:18:37 -0700 Subject: [PATCH] Add standard set of vscode workspace setting files (#5457) * 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. * Clean up grammar * 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. --- .gitignore | 4 ---- .vscode/extensions.json | 11 +++++++++++ .vscode/launch.json | 18 ++++++++++++++++++ .vscode/settings.json | 22 ++++++++++++++++++++++ 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index db319f5835..5900f796f9 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 0000000000..b0c23e31c2 --- /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 21343b2861..edb8a9ac43 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 0000000000..b8279a4f50 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,22 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "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": { + "MD004": false, + "MD024": false, + "MD033": false, + "MD034": false, + "MD038": false, + "MD042": false + }, + + "[powershell]": { + "files.trimTrailingWhitespace": true + } +}