mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab
MIT License
234 stars 15 forks source link

Incorrect indentation after multi-line statements #90

Closed goldrik closed 8 months ago

goldrik commented 8 months ago

When typing a multi-line statement, VS Code incorrectly indents the lines following it.

https://github.com/mathworks/MATLAB-extension-for-vscode/assets/8674612/2f3ecffe-0beb-442b-b623-4320a3346f66

If you type the same lines in the official MATLAB IDE, this indentation does not occur because MATLAB correctly identifies this indent as part of a mutli-line statement.

https://github.com/mathworks/MATLAB-extension-for-vscode/assets/8674612/2c42fcc9-ad98-421f-86b7-e9800c76807a

This is related to Issue #85, where the extension does not seem to handle multi-line statements correctly in general.

dklilley commented 8 months ago

Closing this as a duplicate of #85. The fix for that issue should address this as well.