mathworks / mathworks/MATLAB-extension-for-vscode
Line continuation using ellipses does not handle indentation correctly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 435
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
On the MATLAB IDE, any line continuation using ellipses (...) automatically indents the next line.
On VS Code, this occurs when the continuation occurs after some operator ('=', '+', etc), or if a function is being defined.
However, (as far as I can tell) VS Code does not automatically indent in all other cases.
Here, lines 55, as well as lines 58-61, should have indented automatically.
When doing multiple line continuations using ellipses, each subsequent line should be indented. Once the line is finished, the indentation should go back to its original position. This occurs on the MATLAB IDE automatically. On VS Code, the indentation does not reset after a line is terminated, and you have to manually tab backwards.
Here, when I don't press 'tab' myself, line 56 is indented when it shouldnt be.
Suggestion: Something that would be nice is if VS Code could detect if a line is continuing and automatically add ellipses (when the user presses 'enter' while typing out a line). The MATLAB IDE currently does this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported ellipsis continuation and indentation cases in the MATLAB extension for VS Code, including consecutive continuations and a terminated continuation. Trace the extension's indentation handling from the editor behavior, then verify that continuation lines indent correctly and indentation resets afterward; the suggested automatic insertion of ellipses is a separate enhancement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100