-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Broken indentation of continuation lines #59
Comments
This is definitely an issue with how VSCode behaves, but we might be able to override the behavior here. |
If you want to look into it I'd be happy to review an MR that adds this functionality. |
Sounds good. I'm very unexperienced with TS and the VSCode API, but I can give it a try. |
I actually just ran into a case similar to this where I think we'd need to be careful: I wanted to refactor some code that looked like this my_list = some_function(
[some_long_function(x)
for x in my_other_list]
) into this: my_list = some_function(
[
some_long_function(x)
for x in my_other_list
]
) As an intermediate step, I found myself in this position ( my_list = some_function(
[
some_long_function(x)
|for x in my_other_list
]
) In this case, I would expect the status quo behavior -- VSCode adds exactly three spaces when I press tab, which is what I want in this case. We'd need to make sure behavior like this isn't broken. Maybe it'd be best if you start any MR with a full description of the behavior you're aiming for before spending too much time trying to learn typescript / VSCode APIs. |
Using his code snippet from above, perhaps I can clarify what is requested: ttt,sql = ('SELECT mode FROM pg_locks JOIN pg_class ' "ttt," is 4-spaces as part of a tab (3 t's and a comma for my eyes) and "-" is white spaces for alignment. You can see one tab on the first line, and two tabs plus 3 white spaces for the rest. ttt,ttt,sql = ('SELECT mode FROM pg_locks JOIN pg_class ' I think what is needed, is a recognition that multiple lines are being indented then |
If I have the following code
And press tab I would expect the whole block to be indented four spaces, maintaining the lines alined. Instead I get
Not sure if this is a larger VSCode problem (it does the same without Python Indent). Is there any way to get this to work?
The text was updated successfully, but these errors were encountered: