Gimly / vscode-matlab

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

Add feature to support .mlx file(a matlab live script file) #115

Open tyePhDCandy opened 4 years ago

tyePhDCandy commented 4 years ago

Add feature to support .mlx file(a matlab live script file).

Gimly commented 3 years ago

@rlivings39 Is the grammar for mlx files available on your repository? Would it be hard to add?

rlivings39 commented 3 years ago

MLX files are custom binary files so there's really no grammar to speak of. In the MATLAB Live Editor they provide an interface like this:

https://www.mathworks.com/products/matlab/live-editor.html

Adding support for those would be a significantly bigger project. The request is noted.

jankap commented 2 years ago

In meantime, Mathworks released some details about the format. It's basically a zipped xml file. See https://www.mathworks.com/help/matlab/matlab_prog/live-script-file-format.html and https://www.ecma-international.org/publications-and-standards/standards/ecma-376/.

Rendering these files would be pure awesomeness, it's a nightmare to do code reviews. Current workaround is to always have an export of the file to pure .m code.

@rlivings39, since you seem to work at Mathworks, are you aware of any development or already implemented way to render the files?

Maybe there is a way to convert them to a native notebook and render it with that? https://code.visualstudio.com/api/extension-guides/notebook

rlivings39 commented 2 years ago

I'll ask around internally (at MathWorks) to see as I'm not too familiar with such workflows around MLX files.

ghost commented 2 years ago

What if a webview embedded the live editor using Drive Connector?

Bearing in mind you'd have to copy the project directory to Drive Connector..

atesoriero2000 commented 2 years ago

Has there been any luck getting this to work? I have to use live scripts and am fed up copying code to VS just for multi-cursor.

If there are possible routes to take, I'd help out where I can.

jankap commented 2 years ago

Not I'm aware of.

Regarding multi-cursor, you have basic multiple block cursors in recent versions of the Matlab Editor, too. image Try alt+click and drag.

That said, I think that the new editor is a webview, too. Could this be rendered?

jankap commented 1 year ago

I'll ask around internally (at MathWorks) to see as I'm not too familiar with such workflows around MLX files.

Dear @rlivings39 any updates on that? Looks like a lot is happening currently in terms of notebooks, live scripts and an official VSCode extension updates - will there be a way to render (read-only would be okay for the beginning) MLX files in VSCode and/or Gitlab? It would be extremely helpful because we do all our code reviews in the mentioned tool and not in the Matlab IDE.

tyePhDCandy commented 1 year ago

I'll ask around internally (at MathWorks) to see as I'm not too familiar with such workflows around MLX files.

Dear @rlivings39 any updates on that? Looks like a lot is happening currently in terms of notebooks, live scripts and an official VSCode extension updates - will there be a way to render (read-only would be okay for the beginning) MLX files in VSCode and/or Gitlab? It would be extremely helpful because we do all our code reviews in the mentioned tool and not in the Matlab IDE.

I'm using jupyter notebook extension with matlab kernal. the file extension is .ipynb, you can change the kernal to matlab

hamidingit commented 2 months ago

I'll ask around internally (at MathWorks) to see as I'm not too familiar with such workflows around MLX files.

Dear @rlivings39 any updates on that? Looks like a lot is happening currently in terms of notebooks, live scripts and an official VSCode extension updates - will there be a way to render (read-only would be okay for the beginning) MLX files in VSCode and/or Gitlab? It would be extremely helpful because we do all our code reviews in the mentioned tool and not in the Matlab IDE.

Starting with MATLAB R2024b if you use the new MATLAB Desktop, you have the option of saving your MLX to M based live script. You can also change your settings so that all of your new live scripts would be M based .