Gimly / vscode-matlab

MATLAB support for Visual Studio Code
MIT License
181 stars 35 forks source link

if, else, end one liners disrupt the outline #159

Closed SiFreZi closed 1 year ago

SiFreZi commented 2 years ago

Hello,

function printNice(param)
    if param; disp('true'); else; disp('false'); end
    cmd = '@echo nice';
    dos(cmd);
end

produces a wrong outline: image

else and cmd are shown outside the function.

Regards, Simon

ghost commented 2 years ago

Ouch will have to disable folds in vscode-textmate-languageservice when they are on the same line.

zm-cttae-archive commented 1 year ago

This one wasn't as critical as the other perf issues, but I spent some time and sketched out a fold algorithm that could handle the issue. It'll be fixed when the pull is merged 😃

zm-cttae-archive commented 1 year ago

FWIW I also killed the ability to generate multiple symbols per line.
The VS Code team made a design decision to accept the first keyword token per line as the only important one.