-
Notifications
You must be signed in to change notification settings - Fork 822
improve smart indentation #2848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The implementation: https://github.com/Microsoft/visualfsharp/blob/427318deda16d340e9e61db6af220fee6e81bb78/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs I believe we would need further information to provide to implement the logic, I'm thinking we should pass the current caret location (the column) because if user deindented, the caret location will be in a column less indented. Any idea how I can obtain that information from the context of this class? Any idea where to look for the way it was implemented before we migrated to rely Microsoft.CodeAnalysis? |
Repro steps
Expected behavior
The cursor remains indented to the same level as the one obtained after pressing Backspace
Actual behavior
The indentation jumps back to the indeted level corresponding to last line of the function, the way it works in VS2015.
Known workarounds
None
Related information
The way it behaves in VS2015:

The way it behaves in VS2017:

In both, I have this Tabs settings:
The change in behaviour is rather annoying with muscle memory, and if it was unintended, this might be considered as a bug.
Provide any related information
The text was updated successfully, but these errors were encountered: