-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Indentation not made after a function parameter list with a type hint #1461
Comments
Time to start writing unit tests for this. |
Here's what we have today: {
beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except)\b.*:\s*\S+/,
action: { indentAction: IndentAction.None }
},
{
beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async)\b.*?:\s*/,
action: { indentAction: IndentAction.Indent }
},
{
beforeText: /^\s+(continue|break|return)\b.*/,
afterText: /\s+$/,
action: { indentAction: IndentAction.Outdent }
} If we have the python code I'd like to ensure we have covered all possible scenarios in this issue that can be used as test cases for each of the rules. Unfortunately we don't have any tests for these rules and I'm not comfortable making changes to this. Time to start hunting down all issues related to indentation and prepare a list of test cases/issues. |
Is this unrelated to microsoft/monaco-editor#612 ? |
This seems to be caused by the implementation of editor.formatOnType |
Actual behavior
Expected behavior
The cursor to indent after hitting Enter.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: