Default settings in VS Code are dynamic. They are generated based on your extensions's metadata. That means they are up to date. I have some tips for discovering new settings in Vs Code through Default settings (ninmonkeys.com)
Another extension that helps is Better Align
The main settings:
To get schemas, and validation on Type.ps1xml and Format.ps1xml files, use:
the extension redhat.vscode-xml with this config
"xml.fileAssociations": [
{
"systemId": "https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Format.xsd",
// "pattern": "**/*.Format.ps1xml"
"pattern": "**/*.[Ff]ormat.ps1xml"
},
{
"systemId": "https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Types.xsd",
"pattern": "**/*.[tT]ypes.ps1xml"
}
],Format on save by default
"[json][jsonc][markdown][powershell]": {
"editor.fontSize": 13,
"editor.formatOnSave": true,
"editor.formatOnPaste": false,
// "editor.semanticHighlighting.enabled": true,
},
{ "powershell.codeFormatting.autoCorrectAliases": true, "powershell.codeFormatting.useConstantStrings": true, "powershell.codeFormatting.useCorrectCasing": true, "powershell.codeFormatting.alignPropertyValuePairs": true, // if you want custom rules // "powershell.scriptAnalysis.settingsPath": "C:/dotfiles/pwsh/PSScriptAnalyzerSettings.psd1", }