You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume that this controls the indentation for .ps1 files so hopefully, this is the correct place to post this issue.
With Powershell I have this code:
FunctionGet-ForegroundWindow {
Add-Type@" using System; using System.Runtime.InteropServices; public class ClassGetForegroundWindow { [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow(); }"@return [ClassGetForegroundWindow]::GetForegroundWindow()
}
Get-ForegroundWindow
After reindenting it it appears to be:
FunctionGet-ForegroundWindow {
Add-Type@" using System; using System.Runtime.InteropServices; public class ClassGetForegroundWindow { [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow(); } "@ return [ClassGetForegroundWindow]::GetForegroundWindow()}Get-ForegroundWindow
This then fails to run as the "@ is indented when it shouldn't.
Activity
keith-hall commentedon May 13, 2021
I guess this repo lacks any tmPreferences files controlling indentation, so it uses the defaults. You'd want a
unindentedLinePatternmatching"@iirc.stephen147 commentedon May 13, 2021
Oh, I didn't even think to see if there was one. I assumed there was.
Hopefully, this could get added as a rule if the person maintaining this repo sees this as it would be nice to be included out of the box.
keith-hall commentedon Dec 21, 2024
Once #165 is merged and released, we will be able to officially close this issue as fixed 🎉