Powershell Code Formatter not working
See original GitHub issueSystem Details
System Details Output
PS C:\code\remote-vscode-workspace> & {"### VSCode version: $(code -v)"; "`n### VSCode extensions:`n$(code --list-extensions --show-versions | Out-String)"; "`n### PSES version: $($pseditor.EditorServicesVersion)"; "`n### PowerShell version:`n$($PSVersionTable | Out-String)"}
### VSCode version: 1.33.1 51b0b28134d51361cf996d2f0a1c698247aeabd8 x64
### VSCode extensions:
Kelvin.vscode-sshfs@1.16.1
ms-vscode.powershell@1.12.1
### PSES version: 1.12.1.0
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17134.590
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.590
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When I try to run the formatter on a .ps1 file, using either Alt-Shift-F or selecting format document from the command palette, I get the error message: “There is no formatter for “powershell”-files installed”
Expected Behaviour
I would expect the document to be formatted, I know I have some inconsistencies
Actual Behaviour
I get the error message: “There is no formatter for “powershell”-files installed”
Attached Logs
Follow the instructions in the troubleshooting docs about capturing and sending logs. ps-ext-logs.zip
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Formatting no longer works · Issue #2543 · PowerShell/vscode ...
i have a hard time reading my own code when it's not formatted consistently. i spend almost all my time writing posh code...
Read more >Powershell Format Document not working : r/vscode - Reddit
I have been using Visual Studio Code to help me code Powershell scripts. One of the features I loved was the Format Document...
Read more >VSCode – PowerShell Formating - JordanTheITguy
While this post can't fix all of those it certainly can help solve a lot of the basic arguments including how to format...
Read more >Configure settings to auto format PowerShell code - README
As you type and when you save PowerShell files, they are auto formatted. Also the Script Analyst is enabled.
Read more >User settings not working for formatting PowerShell code
I'm saying formatOnType is not working with ignoreOneLineBlock . The point is that if (1) { 2 } + Enter doesn't format with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The new remoting tools provided in Code Insiders fixes all of my issues
I may have just figured this out…it doesn’t work for files using the remote file system component of visual studio. It seems to work fine on files in a local directory (other files are using SSH FS)