- Links
- Important for loading
- Recommend auto-format
- VS Code Icons
- Integrated Terminal Config
[powershell]
section
"powershell.enableProfileLoading": true,
"powershell.integratedConsole.focusConsoleOnExecute": true,
"powershell.integratedConsole.showOnStartup": true,
"powershell.integratedConsole.suppressStartupBanner": true,
"powershell.startAutomatically": true,
"files.defaultLanguage": "${activeEditorLanguage}",
"powershell.codeFormatting.alignPropertyValuePairs": true,
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.scriptAnalysis.settingsPath": "C:/dotfiles/powershell/PSScriptAnalyzerSettings.psd1",
Some people really prefer the different word separators, here's the main variations One makes ctrl+d and splats easier.
"[powershell]": {
"editor.formatOnSave": true,
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", // break on $ and -
"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?", // combine $ and -
"editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?",
"editor.snippetSuggestions": "bottom",
"files.encoding": "utf8bom",
"editor.formatOnPaste": true,
"files.trimTrailingWhitespace": true,
////
"editor.quickSuggestions": {
"other": true, "comments": false, "strings": true },
"editor.wordBasedSuggestionsMode": "matchingDocuments",
}
"terminal.integrated.defaultProfile.windows": "Pwsh🐒",
"workbench.editor.languageDetection": true,
"powershell.promptToUpdatePackageManagement": false,
"powershell.promptToUpdatePowerShell": false,
"terminal.integrated.defaultLocation": "editor",
"editor.bracketPairColorization.enabled": true,
"editor.semanticHighlighting.enabled": true,
"powershell.codeFormatting.newLineAfterOpenBrace": false,
"powershell.codeFormatting.preset": "OTBS",
"powershell.codeFormatting.trimWhitespaceAroundPipe": true,
"powershell.codeFormatting.whitespaceAroundPipe": true,
"powershell.codeFormatting.whitespaceBetweenParameters": false,
"powershell.powerShellDefaultVersion": "PowerShell (x64)",
"files.associations": {
"*.json": "jsonc",
// powershell
"*.ps1xml": "xml",
// microsoft / vs studio
"*.wixproj": "xml",
"*.mproj": "xml",
"*.odc": "html",
"nuget.config": "xml",
"*.psm1": "powershell",
},
// testing addons
"errorLens.enabled": true,
"errorLens.gutterIconsEnabled": true,
"pester.suppressCodeLensNotice": true,
"pesterExplorer.autoDiscoverOnOpen": true,
"powershell.helpCompletion": "BlockComment",
"powershell.pester.debugOutputVerbosity": "Detailed",
"powershell.pester.outputVerbosity": "FromPreference",
"terminal.explorerKind": "integrated",
"testExplorer.addToEditorContextMenu": true,
"testExplorer.gutterDecoration": true,
"testExplorer.onStart": null,
"testExplorer.useNativeTesting": true,
"testing.automaticallyOpenPeekViewDuringAutoRun": false,
"testing.autoRun.mode": "rerun",
"testing.defaultGutterClickAction": "debug",
"testing.followRunningTest": true,
"testing.gutterEnabled": true,
"powershell.pester.useLegacyCodeLens": false, // might be an addon
"pesterExplorer.autoDiscoverOnOpen": true,
// schema for Powershell
"xml.fileAssociations": [
{
"systemId": "https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Format.xsd",
"pattern": "**/*.Format.ps1xml"
},
{
"systemId": "https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Types.xsd",
"pattern": "**/*.Types.ps1xml"
}
],
{
"workbench.iconTheme": "vscode-icons",
"vsicons.associations.files": [
// justin grote's config: <https://discord.com/channels/180528040881815552/447476910499299358/801102446209794088> { "extensions": [ "arm.json" ], "format": "svg", "icon": "azure" },
{ "extensions": [ "parameters.json" ], "format": "svg", "icon": "config" },
{ "extensions": [ "tests.ps1" ], "format": "svg", "icon": "test" },
{ "extensions": [ "clixml" ], "format": "svg", "icon": "xml" }
],
"vsicons.associations.folders": [
{ "extends": "dist", "extensions": [ "BuildOutput", "Output" ], "format": "svg", "icon": "dist" },
{ "extends": "helper", "extensions": [ "BuildHelpers" ], "format": "svg", "icon": "helper" }
]
}
details
https://code.visualstudio.com/docs/editor/variables-reference
*/
"terminal.integrated.profiles.windows": {
"Pwsh🐒": {
"color": "terminal.ansiMagenta",
"overrideName": true,
"path": [ "pwsh.exe", "C:/Program Files/PowerShell/7/pwsh.exe" ],
"args": [ "-NoLogo" ],
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [ "${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe" ],
"args": [], "icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash", "icon": "terminal-bash"
},
"Pwsh -NoProfile": {
"overrideName": true,
"path": [ "pwsh.exe", "C:/Program Files/PowerShell/7/pwsh.exe" ],
"args": [ "-NoProfile", "-NoLogo" ],
"icon": "terminal-powershell"
},
"Windows PowerShell -NoP": {
"overrideName": true,
"icon": "arrow-both",
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"args": [ "-NoLogo", "-NoProfile" ]
},