-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
*caused-by-extensionIssue identified to be caused by an extensionIssue identified to be caused by an extension
Description
- VSCode Version: 1.15.1
- OS Version: Windows 10 1703
Steps to Reproduce:
- On an otherwise fresh install of VSCode 1.15.1, using PowerShell extension 1.4.1, with user settings configured as follows. The global
editor.tabSizeis5only for illustrative purposes, of course.
{
"files.defaultLanguage": "powershell",
"editor.tabSize": 5,
"[powershell]": {
"editor.detectIndentation": false,
"editor.tabSize": 2
}
}
- Open a .ps1 script file containing the following code. Lines subsequent to the first are indented by 4 spaces.
Get-ChildItem -LiteralPath C:\Windows\System32 |
Where-Object {$_ -is [System.IO.FileInfo]} |
Where-Object Extension -in .cpl,.msc |
Sort-Object Length -Descending |
Select-Object -First 10 |
Select-Object Name,Length
-
Notice that the status bar at the bottom of the VSCode window indicates the language is detected as PowerShell, and appears to show the language-specific
editor.tabSize(Spaces: 2). -
Now right-click within the editor, and select Format Document from the context menu.
-
The indentation will now be five spaces. The global setting has been applied, and the language-specific setting has been ignored.
Reproduces without extensions: No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
*caused-by-extensionIssue identified to be caused by an extensionIssue identified to be caused by an extension